DQL, DML, DDL, DCL differences

Source: Internet
Author: User

DQL (data Query language) querying language

A query statement consisting primarily of select

Basic syntax: Select field name from table name where query condition

DML (Data manipulation language) manipulation language

Mainly used to operate the database data, is our common use of additions and deletions to check. SELECT UPDATE INSERT DELETE

DDL (data definition Language) database definition language

It is primarily used for initializing tasks such as defining or altering the structure of tables, data types, links between tables, and constraints. For example, create a table/library, delete a table/library, modify a table, define an index (key), and so on. CREATE ALTER drop and so on. DDL is submitted by stealth and cannot be rollback

Common commands:

Create database-Creating new databases
ALTER DATABASE-Modify databases


CREATE table-Creates a new table
ALTER TABLE-Change (change) database table
drop table-Delete tables


Create index-Creating indexes (search key)
Drop INDEX-Delete indexes

DCL (Data Contron language) database control language

Primarily used to set or change database user or role permissions, grant or reclaim some kind of privilege to access the database, and control the time and effect of database manipulation transactions, monitor the database, and so on. Grant (Authorization) DENY REVOKE REMOVE ROLLBACK (rollback) commit (commit)

Example: ROLLBAKC [Work] to [savepoint]

DQL, DML, DDL, DCL differences

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.