Multiple choice

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.

  1. Only i and iii

  2. Only ii and iii

  3. Only i and iv

  4. Only ii and iv

Reveal answer Fill a bubble to check yourself
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.