Syntax :
·
Removes all rows/records of given table
·
Is a DDL command, so Commit is NOT
required
·
Can’t rollback after remove rows by
truncate
·
Deallocates all space used by the
removed rows
·
Faster than delete command
·
DROP STORAGE option is to deallocate all
space from the deleted rows from the table
·
REUSE STORAGE option is to retain the
space from the deleted rows allocated to the table
Examples
:
1) SQL>
TRUNCATE TABLE emp;
-
Removes all records from emp table
2) SQL>
TRUNCATE TABLE emp REUSE STORAGE;
No comments:
Post a Comment