Database Administrator (DBA) Question:

Compare and contrast TRUNCATE and DELETE for a table.

Tweet Share WhatsApp

Answer:

Both the truncate and delete command have the desired outcome of getting rid of all the rows in a table. The difference between the two is that the truncate command is a DDL operation and just moves the high water mark and produces a now rollback. The delete command, on the other hand, is a DML operation, which will produce a rollback and thus take longer to complete.

Download Database Administrator (DBA) PDF Read All 253 Database Administrator (DBA) Questions
Previous QuestionNext Question
Where would you look for errors from the database engine?Give the reasoning behind using an index.