Database-Management-System
August 29, 2024Database-Management-System
August 29, 2024Database-Management-System
| Question 398 |
Properties of ‘DELETE’ and ‘TRUNCATE’ commands indicate that
| After the execution of ‘TRUNCATE’ operation, COMMIT, and ROLLBACK statements cannot be performed to retrieve the lost data, while ‘DELETE’ allow it | |
| After the execution of ‘DELETE’ and ‘TRUNCATE operation retrieval is easily possible for the lost data | |
| After the execution of ‘DELETE’ operation, COMMIT and ROLLBACK statements can be performed to retrieve the lost data, while TRUNCATE do not allow it | |
| After the execution of ‘DELETE’ and ‘TRUNCATE’ operation no retrieval is possible for the lost data |
Question 398 Explanation:
TRUNCATE is a DDL command, it does not require a commit to make the changes permanent. Because of this reason the rows deleted by truncate could not be rollbacked. On the other hand, DELETE is a DML command, hence requires explicit commit to make its effect permanent.After performing a DELETE, you need to COMMIT or ROLLBACK the transaction to make the change permanent or to undo it.
Correct Answer: C
Question 398 Explanation:
TRUNCATE is a DDL command, it does not require a commit to make the changes permanent. Because of this reason the rows deleted by truncate could not be rollbacked. On the other hand, DELETE is a DML command, hence requires explicit commit to make its effect permanent.After performing a DELETE, you need to COMMIT or ROLLBACK the transaction to make the change permanent or to undo it.
