SQL|DDL, DML and DCL commands

Data Definition Language :- DDL is a past of SQL, which consists of the commands that used to define define database schema, and used to create and modify the structure of database object in database. There are following DDL commands used in database.

Create command :- This command used to create database and its object like table,index, views and function. Syntax:

CREATE TABLE table_name (column_name (data_type));

Alter command :- This command used to alter the structure of database. Syntax:

ALTER TABLE <table name> [option];

Drop command :- This command used to delete object from the database. Syntax:

DROP TABLE <table name>;

Rename command :- This command used to rename an object. Syntax:RENAME TABLE

<old table name> <new table name>;

Data Manipulation Language :- DML is a part of SQL, which deals with the data manipulation, and include common SQL statements. Such as Select, Insert, Update, Delete etc.

Select command :- This command used to retrieve data from a database. Syntax:

SELECT*FROM STUDENT;

Insert command :- This command used to insert data into the table. Syntax:

INSERT into <table name> VALUES (<value 1>,<value 2>,….);

Update command :- This command used to update data in database. Syntax: