Question discussion

Which SQL command removes all the rows of a table quickly, without a WHERE clause, while keeping the table structure?

1987Medium DSSSB TGT Computer Science 0 replies 1 views
0

Which SQL command removes all the rows of a table quickly, without a WHERE clause, while keeping the table structure?

  • ADROP TABLE
  • BTRUNCATE TABLE
  • CALTER TABLE
  • DUPDATE TABLE
Correct answer: B

Explanation

TRUNCATE TABLE deletes every row but retains the table definition, whereas DROP TABLE removes the table itself.

Discussion 0

Nobody has replied yet. Start the discussion!