CREATE & ALTER belong to DDL category - Database

Q.  Under which category do the commands CREATE and ALTER belong to?
- Published on 26 Aug 15

a. DML
b. DDL
c. UML
d. None of the above.

ANSWER: DDL
 

    Discussion

  • Nirja Shah   -Posted on 02 Nov 15
    DDL
    - Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples:

    - CREATE - Is is used to create objects in the database
    - ALTER - It alters the structure of the database
    - DROP - It deletes object from the database
    - TRUNCATE - It removes all the records from a table, including all spaces allocated for the records are removed
    - COMMENT - It adds comment to the data dictionary
    - RENAME - It renames an object

    DML
    - Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples:

    - SELECT - It retrieves data from the a database
    - INSERT - It inserts data into a table
    - UPDATE - It updates existing data within a table
    - DELETE - It deletes all records from a table, the space for the records remain
    - MERGE - The UPSERT operation (insert or update)
    - CALL - It calls a PL/SQL or Java subprogram
    - EXPLAIN PLAN - It explains the access path to data
    - LOCK TABLE - It controls concurrency

    DCL
    - Data Control Language (DCL) statements. Some examples:

    - GRANT - It gives user's access privileges to database
    - REVOKE - It withdraw access privileges given with the GRANT command

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)