Pregunta de entrevista de EY

Measure difference between delete and truncate

Respuesta de la entrevista

Anónimo

21 ene 2024

TRUNCATE always removes all the rows from a table, leaving the table empty and the table structure intact whereas DELETE may remove conditionally if the where clause is used. The rows deleted by TRUNCATE TABLE statement cannot be restored and you can not specify the where clause in the TRUNCATE statement.