DA0-001 · Question #107
What SQL command is used to delete an entire table from a database?
The correct answer is A. DROP. The SQL command DROP is used to entirely remove an existing table and all its data from a database.
Question
What SQL command is used to delete an entire table from a database?
Options
- ADROP.
- BMODIFY.
- CDELETE.
- DALTER.
How the community answered
(25 responses)- A96% (24)
- B4% (1)
Why each option
The SQL command DROP is used to entirely remove an existing table and all its data from a database.
The DROP TABLE command is a Data Definition Language (DDL) statement specifically designed to delete an entire table from a database, including its structure, data, and indexes.
MODIFY is not a standard SQL command used for deleting entire tables; it is typically used within an ALTER TABLE statement to change column definitions.
DELETE is a Data Manipulation Language (DML) command used to remove rows from a table, but it leaves the table structure intact.
ALTER is a DDL command used to modify the structure of an existing table, such as adding or deleting columns, but not to delete the entire table itself.
Concept tested: SQL DDL commands
Source: https://www.w3schools.com/sql/sql_drop_table.asp
Topics
Community Discussion
No community discussion yet for this question.