nerdexam
CompTIA

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.

Data Concepts and Environments

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)
  • A
    96% (24)
  • B
    4% (1)

Why each option

The SQL command DROP is used to entirely remove an existing table and all its data from a database.

ADROP.Correct

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.

BMODIFY.

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.

CDELETE.

DELETE is a Data Manipulation Language (DML) command used to remove rows from a table, but it leaves the table structure intact.

DALTER.

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

#SQL#DDL#Database management#Table operations

Community Discussion

No community discussion yet for this question.

Full DA0-001 Practice