Vidyalelo
Database · Q7

Introduction to SQL

Programming · Database · question 7

Q7

The command to eliminate a table from a database is:

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

Answer: Option B

Solution

Answer: Option B
Solution:
Option A: REMOVE TABLE CUSTOMER; - There is no SQL command called REMOVE TABLE. This option is incorrect.
Option B: DROP TABLE CUSTOMER; - The DROP TABLE command in SQL is used to remove a table from the database. This option correctly describes the command to eliminate a table.
Option C: DELETE TABLE CUSTOMER; - The DELETE command is used to remove rows from a table, not the table itself. This option is incorrect.
Option D: UPDATE TABLE CUSTOMER; - The UPDATE command is used to modify existing rows in a table, not to eliminate the table itself. This option is incorrect.
Conclusion:
To eliminate (delete) a table from a database in SQL, you use the DROP TABLE statement followed by the table name. Therefore, the correct answer is Option B: DROP TABLE CUSTOMER;.