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

Discussion

Which command is used to remove a relation from an SQL database ?

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

Answer: A

A relation is removed with Drop.

DROP TABLE student; deletes the relation itself: its schema, all its tuples, and its indexes and constraints. Afterwards the table no longer exists in the database.

DELETE FROM student; removes tuples but leaves the empty relation in place. PURGE is an Oracle-specific command for clearing dropped objects from the recycle bin, and REMOVE is not an SQL command.

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

Post your comment

Please log in or register to post a comment.