Question:

In SQL which of the following is a data definition language command ?

Show Hint

Categorize SQL commands: - DDL (Definition): `CREATE`, `ALTER`, `DROP` - DML (Manipulation): `SELECT`, `INSERT`, `UPDATE`, `DELETE` - DCL (Control): `GRANT`, `REVOKE`
  • Alter Table
  • Revoke
  • Grant
  • Update
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Define Data Definition Language (DDL). DDL commands are used to define and manage the structure of database objects (like tables, indexes). The main DDL commands are `CREATE`, `ALTER`, and `DROP`.
Step 2: Classify the given commands.

(A) \text{Alter Table}: Modifies the structure of a table. This is a DDL command.
(B) \text{Revoke}: Takes away user permissions. This is a Data Control Language (DCL) command.
(C) \text{Grant}: Gives user permissions. This is a DCL command.
(D) \text{Update}: Modifies data within a table. This is a Data Manipulation Language (DML) command.
Therefore, \text{Alter Table} is the DDL command among the options.
Was this answer helpful?
0
0