Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
187 views

What Are The Difference Between DDL, DML and DCL Commands?

DDL commands like CREATE, ALTER, and DROP are used to define and manage database schemas and objects. DML commands like SELECT, INSERT, UPDATE and DELETE are used to retrieve and manipulate data within database objects. DCL commands such as GRANT and REVOKE are used to manage user privileges and access control.

Uploaded by

aziz
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
187 views

What Are The Difference Between DDL, DML and DCL Commands?

DDL commands like CREATE, ALTER, and DROP are used to define and manage database schemas and objects. DML commands like SELECT, INSERT, UPDATE and DELETE are used to retrieve and manipulate data within database objects. DCL commands such as GRANT and REVOKE are used to manage user privileges and access control.

Uploaded by

aziz
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

SQL

What are the difference between DDL, DML and DCL commands?
DDL - Data Definition Language: statements used to define the database structure or schema.
Some examples:

 CREATE - to create objects in the database


 ALTER - alters the structure of the database
 DROP - delete objects from the database
 TRUNCATE - remove all records from a table, including all spaces allocated for the
records are removed
 COMMENT - add comments to the data dictionary
 RENAME - rename an object

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

 SELECT - retrieve data from the a database


 INSERT - insert data into a table
 UPDATE - updates existing data within a table
 DELETE - deletes all records from a table, the space for the records remain
 MERGE - UPSERT operation (insert or update)
 CALL - call a PL/SQL or Java subprogram
 EXPLAIN PLAN - explain access path to data
 LOCK TABLE - control concurrency

DCL - Data Control Language. Some examples:

 GRANT - gives user's access privileges to database


 REVOKE - withdraw access privileges given with the GRANT command

TCL - Transaction Control: statements used to manage the changes made by DML statements. It
allows statements to be grouped together into logical transactions.

You might also like