DML (Data Manipulation Language) :: SQL Commands Are Divided Into Four Categories As Below
DML (Data Manipulation Language) :: SQL Commands Are Divided Into Four Categories As Below
1. DML (Data Manipulation Language): DML is used for changing data within the database. Examples: 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 . CALL: call a PL/SQL or Java subprogram . EXPLAIN PLAN: explain query access path to data . LOCK: control concurrency . MERGE: UPSERT operation (insert or update) .
2. DDL (Data Definition Language): It is used to create, delete, modify the database structure, not data. Examples: CREATE: to create objects in the database ALTER: alters the structure of the database DROP: delete objects from the database COMMENT: add comments to the data dictionary TRUNCATE: remove all records from a table, including all spaces allocated for the records are removed . RENAME: rename an object .
3. DCL (Data Control Language): It is used to control access to data and database.
Examples: GRANT: gives user's access privileges to database. REVOKE: withdraw access privileges given with the GRANT command .
4. TCL (Transaction Control Language): statements used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions. Examples: COMMIT: save work done ROLLBACK: restore database to original since the last COMMIT SAVEPOINT: identify a point in a transaction to which you can later roll back SET TRANSACTION: Change transaction options like isolation level and what rollback segment to use
5. DQL (Data Query Language): It is used to fetch data from the database using select statement. Examples: SELECT: retrieve data from the a database