Machine-translated by Google. Questions are authored in English.
Top

Discussion

To remove a relation from an SQL database, we use the ______ command.

  • A. Delete
  • B. Purge
  • C.Remove
  • D.Drop table

Answer: D

Correct answer: Drop table

DROP TABLE removes the relation entirely - its rows, its definition, its indexes and its constraints - leaving no object of that name.

DELETE is the near-miss and the distinction is important: it removes rows but keeps the table, so an empty relation remains ready for new data. DROP is a DDL statement and DELETE a DML one. Purge and Remove are not standard SQL for this purpose.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.