There are 5 types of SQL Commands 1. DDL: Data Definition Language 2. DQL: Data Query Language 3. DML: Data Manipulation Language 4. DCL: Data Control Language 5. TCL: Transaction Control Language
DDL commands are used to define the Database (DB) objects.
CREATE: Used to Create DB Objects.
DROP: Used to Delete DB Objects.
ALTER: Used to alter the structure of DB Objects.
RENAME: Used to Rename existing object.
TRUNCATE: Used to Remove all the records from a table.
(2/n)
DQL commands are used to retrieve data from the database.
DML commands are used in manipulation of data in the database.
INSERT : Used to insert data into a table.
UPDATE : Used to update existing data within a table.
DELETE : Used to delete records from a table.
MERGE : Used to UPSERT (Update/Insert) records in/into a table.
(4/n)
DCL commands are used to control permissions on the database objects.
GRANT : Used to give user access privilege to the database object.
REVOKE : Used to withdraw user access privilege to the database object.
TCL commands are used to manage changes made by DML commands.
COMMIT: Used to commit a transaction (tx).
ROLLBACK: Used to rollback a tx in case of errors.
SAVEPOINT: Used to set a save point within a tx.
SET TRANSACTION: Used to specify characteristics of a tx.
(6/n) #sql
Hope this thread was useful to learn some basic type of SQL Commands.
Do follow @teamkaliyona for much such technical content and Retweet so that it can help others.
We do offer lot of courses for free or affordable prices, do check and get benefited
Follow our Kaliyona YouTube Channel for more free content