Properties of ‘DELETE’ and ‘TRUNCATE’ commands indicate that
2020
Properties of ‘DELETE’ and ‘TRUNCATE’ commands indicate that
- A.
After the execution of ‘TRUNCATE’ operation, COMMIT and ROLLBACK statements can be performed to retrieve the lost data, while ‘DELETE’ don't allow it.
- B.
After the execution of ‘DELETE’ and ‘TRUNCATE’ operation retrieval is easily possible for the lost data.
- C.
After the execution of ‘DELETE’ operation, COMMIT and ROLLBACK statements can be performed to retrieve the lost data, while TRUNCATE do not allow it.
- D.
After the execution of ‘DELETE’ and ‘TRUNCATE’ operation no retrieval is possible for the lost data.
Attempted by 318 students.
Show answer & explanation
Correct answer: C
DELETE is a DML command that logs row deletions, allowing transactions to be rolled back. In contrast, TRUNCATE is a DDL command that deallocates pages and typically auto-commits, preventing data retrieval via rollback.
A video solution is available for this question — log in and enroll to watch it.