SQL language Categories

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.