oracle 删除

drop table是删除表。
truncate table是删除表内数据。
truncate是DDL语句,所以它所做的删除是无法通过闪回找回的。
truncate连同索引一并删除。
delete是DML语句,它所做的删除可以通过闪回找回。
truncate删除大量数据时,效率高于delete。
用truncate删除相当于永久删除。


批量删除表:
select 'drop table '||table_name||';'
from user_tables where table_name like 'ABC%'
order by table_name;

猜你喜欢

转载自th8410.iteye.com/blog/2010819