0% found this document useful (0 votes)
14 views

DML (Data Manipulation Language) :: SQL Commands Are Divided Into Four Categories As Below

SQL commands are divided into five categories: DML for manipulating data, DDL for defining database structure, DCL for controlling access, TCL for managing transactions, and DQL for querying data. DML includes commands like INSERT, UPDATE, DELETE, and CALL. DDL contains CREATE, ALTER, DROP, COMMENT, and TRUNCATE. DCL has GRANT and REVOKE. TCL consists of COMMIT, ROLLBACK, and SAVEPOINT. DQL only contains SELECT.

Uploaded by

Karthick Saga
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)
14 views

DML (Data Manipulation Language) :: SQL Commands Are Divided Into Four Categories As Below

SQL commands are divided into five categories: DML for manipulating data, DDL for defining database structure, DCL for controlling access, TCL for managing transactions, and DQL for querying data. DML includes commands like INSERT, UPDATE, DELETE, and CALL. DDL contains CREATE, ALTER, DROP, COMMENT, and TRUNCATE. DCL has GRANT and REVOKE. TCL consists of COMMIT, ROLLBACK, and SAVEPOINT. DQL only contains SELECT.

Uploaded by

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

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

You might also like