Oracle
TRUNCATE statement
Figo Kim
2006. 9. 2. 13:58
- Removes all rows from a table, leaving the table empty and the table sturcture intact
- Is a data definite language(DDL) statement rather than a DML statement; cannot easily be undone. (You don't have to commit to imply the result. it will implicitly commit. == Generate no rollback information)
- If the table is the parent of a referential integrity constraint, you cannot truncate the table. You need to disable the constraint before issuing the TRUNCATE statement.
- Syntax
TRUNCATE TABLE table_name;
ex) TRUNCATE TABLE copy_emp;