SQL> select * from T2;
I2
----------
1
2
SQL> we discuss the diffrence betwween delete and truncate;
SQL> delete from t2;
2 rows deleted.
SQL> select * from T2;
no rows selected
SQL> rollback
2 ;
Rollback complete.
SQL> select * from T2;
I2
----------
1
2
SQL> we delete the data from table,we can rollback,and the data deleted will back;
SQL>
SQL> select * from T2;
I2
----------
1
2
SQL> truncate table t2;
Table truncated.
SQL> select * from T2;
no rows selected
SQL> rollback;
Rollback complete.
SQL> select * from T2;
no rows selected
SQL> we truncate a table,the data will be found never!
SQL> delete is a DML ,but truncate is a DDL;
[@more@]来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12262773/viewspace-1046211/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12262773/viewspace-1046211/