delete from 表名 where 條件 –>刪除滿足條件的記錄delete from test where id = 1;
delete from test –>刪除所有
commit; –>提交數(shù)據(jù)
rollback; –>回滾數(shù)據(jù)
delete方式可以恢復(fù)刪除的數(shù)據(jù),但是提交了,就沒(méi)辦法了 delete刪除的時(shí)候,會(huì)記錄日志 –>刪除會(huì)很慢很慢
truncate table 表名刪除所有數(shù)據(jù),不會(huì)影響表結(jié)構(gòu),不會(huì)記錄日志,數(shù)據(jù)不能恢復(fù) –>刪除很快
drop table 表名刪除所有數(shù)據(jù),包括表結(jié)構(gòu)一并刪除,不會(huì)記錄日志,數(shù)據(jù)不能恢復(fù)–>刪除很快
5、數(shù)據(jù)復(fù)制
表數(shù)據(jù)復(fù)制insert into table1 (select * from table2);
復(fù)制表結(jié)構(gòu)create table table1 select * from table2 where 1>1;
復(fù)制表結(jié)構(gòu)和數(shù)據(jù)create table table1 select * from table2;
復(fù)制指定字段create table table1 as select id, name from table2 where 1>1;
四、數(shù)據(jù)庫(kù)復(fù)制命令
以上關(guān)于本文的內(nèi)容,僅作參考!溫馨提示:如遇健康、疾病相關(guān)的問(wèn)題,請(qǐng)您及時(shí)就醫(yī)或請(qǐng)專業(yè)人士給予相關(guān)指導(dǎo)!
「愛(ài)刨根生活網(wǎng)」www.malaban59.cn小編還為您精選了以下內(nèi)容,希望對(duì)您有所幫助:- 講解oracle建立用戶及授權(quán) 正版oracle授權(quán)購(gòu)買
- 獲取當(dāng)前客戶端IP地址詳解 js獲取客戶端ip地址
- 中國(guó)人離不開(kāi)的五大軟件 中國(guó)人離不開(kāi)的五大軟件你敢卸載那一個(gè)
- 如何使用Oracle數(shù)據(jù)庫(kù) oracle登陸數(shù)據(jù)庫(kù)
- oracle數(shù)據(jù)庫(kù)基礎(chǔ)知識(shí) oracle數(shù)據(jù)庫(kù)類型的文件
- 手機(jī)火狐瀏覽器默認(rèn)下載路徑 火狐瀏覽器卸載不了
- oracle中替換字段內(nèi)容 oracle替換指定字符串字符
- oracle數(shù)據(jù)庫(kù)菜鳥(niǎo)教程 oracle 性能優(yōu)化工具
- win7自帶office卸載方法 office2013卸載不了怎么辦
- 數(shù)據(jù)庫(kù)性能優(yōu)化方法 oracle性能調(diào)優(yōu)總結(jié)
