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

Discussion

Delete from r; r - relation This command performs which of the following action ?

  • A.Remove relation
  • B.Clear relation entries
  • C.Delete fields
  • D.Delete rows

Answer: B

Correct answer: Clear relation entries

DELETE FROM r with no WHERE clause removes every tuple in the relation, leaving the relation itself in place - defined, empty, and ready for new rows.

That is the precise sense in which the entries are cleared rather than the relation removed: DROP TABLE r would be needed for the latter. Nor are fields affected, since DELETE works on whole rows and never on the column structure. TRUNCATE TABLE achieves the same emptying more quickly, without logging each row.

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

Post your comment

Please log in or register to post a comment.