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

Discussion

The command to eliminate a table from a database is:

  • A.REMOVE TABLE CUSTOMER;
  • B.DROP TABLE CUSTOMER;
  • C.DELETE TABLE CUSTOMER;
  • D.UPDATE TABLE CUSTOMER;

Answer: B

Correct answer: DROP TABLE CUSTOMER;

DROP TABLE removes the table itself - its rows, its definition, its indexes and its constraints - leaving no object of that name in the database.

The contrast with DELETE is the point of the question. DELETE FROM CUSTOMER removes rows but keeps the table, ready for new ones. DROP is data definition, DELETE is data manipulation. TRUNCATE TABLE sits between them, emptying the table quickly while keeping its structure. REMOVE TABLE and DELETE TABLE are not SQL.

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

Post your comment

Please log in or register to post a comment.