What are various types of SQL statements?

These SQL statements are divided into four major categories depending on their actions

·         DDL (Data Definition Language)

·         DML (Data Manipulation Language)

·         DCL (Data Control Language)

·         TCL (Transaction Control Language)

 

DDL is used to manage the structure of the tables. The main keywords under DDL are CREATE, ALTER and DROP.

DML is used to manage the records inside the tables. The main keywords under DML are INSERT, UPDATE, DELETE and SELECT.

DCL is used to manage the user access control. The main keywords under DCL are GRANT and REVOKE.

TCL is used to manage the changes made by DML statements in the database. Themain keywords under TCL are COMMIT, ROLLBACK and SAVEPOINT.

Comments

Popular posts from this blog

What SQL can do?

What are different data types to manage data in the columns or fields?

What is SQL?