Question

    Which of the following SQL commands is classified as a

    Data Definition Language (DDL) command?
    A SELECT Correct Answer Incorrect Answer
    B INSERT Correct Answer Incorrect Answer
    C CREATE Correct Answer Incorrect Answer
    D UPDATE Correct Answer Incorrect Answer
    E COMMIT Correct Answer Incorrect Answer

    Solution

    The CREATE command is a fundamental DDL command used to define and structure database objects like tables, schemas, views, and indexes. 1. Purpose: It sets up the framework for storing and managing data by defining objects before any data is inserted. 2. Examples: Commands such as CREATE TABLE, CREATE VIEW, and CREATE INDEX establish database structures. 3. Irreversible Changes: Unlike DML commands, changes made by DDL commands, such as CREATE, are persistent and affect the database schema. 4. DDL Classification: Commands in this category include CREATE, ALTER, and DROP, all related to defining and modifying the database schema. The CREATE command is indispensable for initiating a database system, ensuring proper data organization and storage. Why Other Options Are Incorrect: • A) SELECT: A DML command used to retrieve data, not to define database structures. • B) INSERT: A DML command for adding records into a table. • D) UPDATE: A DML command used to modify existing data in a table. • E) COMMIT: A TCL command that saves transactions to the database, unrelated to schema definition.

    Practice Next