| From: | Steve Adams |
| Date: | 24-Mar-2001 16:28 |
| Subject: | Truncate |
|
|
Truncate just resets the high-water mark. It does not delete any rows. If you delete rows, then whatever you have specified regarding the referential integrity will be done (ON DELETE SET NULL, or ON DELETE CASCADE, or the default which is to return ORA-02292 if the referential integrity constraint would be violated) whereas TRUNCATE just returns ORA-02266 if you have any enabled foreign key constraints referencing the table, even if the tables are empty.
|
![]() |
I just want to know what actually happens internally when we issue TRUNCATE command. This came in my mind when I try to truncate a table in which there are some columns which have foreign key relation, gives foreign key violation. But when I delete the table, it deletes the table. Why this difference?
|