SQL language is divided into four main categories: Data Query Language DQL, Data manipulation language DML, data definition language DDL, Data Control Language DCL.
DQL (data Query Language)
DML (Data Manipulation language):
They are select, UPDATE, INSERT, DELETE, just like its name, these 4 commands are the languages used to manipulate the data in the database
DDL (data definition Language):
DDL is more than DML, the main command has create, alter, DROP, etc., DDL is mainly used in the definition or Change tables (table) of the structure, data types, links between tables and constraints such as initialization work, most of them in the creation of tables using
DCL (Data Control Language):
is the database control function. is a statement that is used to set or change permissions for a database user or role, including (Grant,deny,revoke, etc.) statements. By default, only people such as Sysadmin,dbcreator,db_owner or db_securityadmin have the power to execute the DCL
DDL (data definition Language)
CREATE table creating tables ALTER TABLE modify tables drop table Delete tables TRUNCATE TABLE delete all rows in tables CREATE index drop Index Delete Index when executing a DDL statement, Oracle commits the current transaction before and after each statement. If the user inserts a record into the database using the Insert command, executes a DDL statement, such as CREATE table, at which time the data from the Insert command is committed
to the database. When the DDL statement execution completes, the DDL statement is automatically committed and cannot be rolled back.
DML (data manipulation Language) Insert records inserted into database update modify database record delete delete database records when the Execute DML command is not committed, it will not be seen by other sessions. Unless a DDL command or DCL command is executed after the DML command, or the user exits the session or terminates the instance, a commit command is automatically issued to make the uncommitted DML command commit.
SQL language Categories