top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What do you understand by DDL and DML statements?

+1 vote
554 views
What do you understand by DDL and DML statements?
posted Aug 22, 2017 by Kumar Neeraj

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples:

 1. CREATE - to create objects in the database
 2. ALTER - alters the structure of the database 
 3. DROP - delete objects from the database
 4. TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
 5. COMMENT - add comments to the data dictionary
 6. RENAME - rename an object

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

1. SELECT - retrieve data from the a database 
 2. INSERT - insert data into a table UPDATE - updates existing data within a table
 3. DELETE - deletes all records from a table, the space for the records remain
 4. MERGE - UPSERT operation (insert or update)
 5. CALL - call a PL/SQL or Java subprogram    
 6. EXPLAIN PLAN - explain access path to data 
 7. LOCK TABLE - control concurrency
answer Sep 14, 2017 by Manikandan J
0 votes

HI, It is sql statement which is used for perform specific operation.

DDL(Data Definition Language) : DDL or Data Definition Language actually consists of the SQL commands that can be used to define the database schema. It is used to create and modify the structure of database objects in the database.

Create - is used to create the database or its objects (like table, index, function, views, store procedure and triggers).
Alter -  is used to alter the structure of the database.
Drop - is used to delete objects from the database.
Rename -is used to rename an object existing in the database.
Truncate - is used to remove all records from a table, including all spaces allocated for the records are removed.
Comment - is used to add comments to the data dictionary.

DML(Data Manipulation Language) :The SQL commands that deals with the manipulation of data present in the database belong to DML or Data Manipulation Language and this includes most of the SQL statements.

Insert  – is used to insert data into a table.
Update – is used to update existing data within a table.
Delete – is used to delete records from a database table.
answer Nov 6, 2019 by Siddhi Patel
...