Which of the following are true?
i. TRUNCATE command is used to remove all the rows in a given table without rollback.
ii. TRUNCATE command is used to drop the table.
iii. DELETE command is used to remove all the rows in a given table with rollback.
iv. DELETE command is used to remove all the rows in a given table without rollback.
-
Only i and iii
-
Only ii and iii
-
Only i and iv
-
Only ii and iv
A
Correct answer
Explanation
This answer is correct. TRUNCATE command is a DDL (Data Definition Language) command, which is used to remove all the rows from a given table without rollback. Since it is a DDL (Data Definition Language) command, it automatically commits the transaction. DELETE command is a DML (Data Manipulation Language) command, which is used to remove all the rows from a given table with rollback option.