"CREATE TABLE T" in SQL is an example of :

2023

"CREATE TABLE T" in SQL is an example of :

  1. A.

    Normalization

  2. B.

    DML

  3. C.

    DDL

  4. D.

    Primary key

Attempted by 1649 students.

Show answer & explanation

Correct answer: C

Answer: Data Definition Language (DDL).

Explanation: The statement CREATE TABLE defines the structure of a database table (its columns, data types, and optionally constraints). Statements that define or modify the database schema are classified as Data Definition Language (DDL).

  • Common DDL examples: CREATE, ALTER, DROP, TRUNCATE.

  • CREATE TABLE specifically creates a new table and defines its columns and constraints.

Why the other choices are incorrect:

  • Normalization is a design process to organize tables and remove redundancy; it is not a SQL statement type.

  • Data Manipulation Language (DML) includes operations that change or query table data such as INSERT, UPDATE, DELETE, and SELECT; it does not define table structure.

  • Primary key is a constraint applied to a column or columns to enforce uniqueness; it can be declared inside a CREATE TABLE statement but is not the same as the CREATE TABLE command.

Key takeaway: Use DDL when creating or changing the database schema; use DML to manipulate the data within that schema.

Explore the full course: Mppsc Assistant Professor