详解Oracle DELETE和TRUNCATE 的区别

2025-06-28 01:57:26
推荐回答(1个)
回答1:

delete from table_name where xxxx;
commit;

trncate table table_name;

delete可以后面跟where条件,可以指定删除某些数据,需要用commit提交事务。truncate是清除整表,不需要用commit提交事务。