What is the difference between TRUNCATE and DROP statements ? - www.studyandupdates.com

Monday

What is the difference between TRUNCATE and DROP statements ?

Q 25. What is the difference between TRUNCATE and DROP statements ?


 DROPTRUNCATE
The DROP command is used to remove the table definition and its contents.Whereas the TRUNCATE command is used to delete all the rows from the table.
In the DROP command, table space is freed from memory.While the TRUNCATE command does not free the table space from memory.
DROP is a DDL(Data Definition Language) command.Whereas the TRUNCATE is also a DDL(Data Definition Language) command.
In the DROP command, a view of the table does not exist.While in this command, a view of the table exists.
In the DROP command, integrity constraints will be removed.While in this command, integrity constraints will not be removed.
In the DROP command, undo space is not used.While in this command, undo space is used but less than DELETE.

The DROP command is quick to perform but gives rise to complications.While this command is faster than DROP.







No comments:

Post a Comment

Popular Posts