TRUNCATE command in SQL is used to _________.

2017

TRUNCATE command in SQL is used to _________.

  1. A.

    Delete data from table

  2. B.

    Alter data from table

  3. C.

    Modify data from table

  4. D.

    All of these

Attempted by 165 students.

Show answer & explanation

Correct answer: A

The correct answer is A (Delete data from table). The TRUNCATE command in SQL is a Data Definition Language (DDL) operation used to quickly delete all rows or data from a table while keeping the table structure, columns, constraints, and indexes intact.

Explore the full course: Btsc Lab Assistant