Domanda di colloquio di EY

Measure difference between delete and truncate

Risposta di colloquio

Anonimo

21 gen 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.