Database languages, difference between DDL, DML, SQL


what is the difference between DDL, DML, SQL


DDL: Data Definition Language, It is related to definition of data(table or schema) like Create statement of sql because it has what are columns of table and what are there type which is nothing but definition of table. DDL include CREATE, ALTER and DROP.

DML Data Manipulation Language, It is related to manipulation(modification) of data like inserting,deleting or modifying any data inside a table. DML includes INSERT, DELETE and MODIFY.

I think SQL is question is DQL(typo). So I will explain DQL

DQL: Data Query Language, It is related to querying data from a table like Select statement in sql which will apply some operations(filter,sort etc) on table and return the data


DDL(Data Definition Language):

It refers to the CREATE,ALTER and DROP statements.
DDL allows to add/modify/delete the logical structures which contain the data or which allows user to access /maintain the data(databases,tables,keys,views…).DDL is about “metadata”.

DML(Data Manipulation Language):

it refers to INSERT,UPDATE and DELETE statements.
DML allows to add /modify/delete data itself.

DQL(Data Query Language): it refers to the GRANT and REVOKE statements (queries)
SELECT is the main DQL retrieves the data you need.SHOW retrieves infos about the metadata.HELP… is for people who need help.

as you have asked about even SQL-
it is a domain-specific language used in programming and designed for managing data held in a relational database management system, or for stream processing in a relational data stream management syatem.