SQL Four languages: DDL,DML,DCL,TCL

Source: Internet
Author: User


  1. SQL four languages: DDL,DML,DCL,TCL
    1. DDL (data definition Language) Database Definition language statements is used toDefine theDatabaseStructureor Schema. DDL is one of the four functions of SQL language. A three-level structure for defining a database, including external, conceptual, internal, and inter-image, defining data integrity, security controls, and other constraints DDL does not require commit.CREATEALTERDROPTRUNCATECommentrename
    2. DML (data manipulation Language) Manipulation language statements is used forManaging Data withinSchemaobjects. Provided by the DBMS for use by the user or programmer to implement operations on the data in the database. DML is divided into two classes: interactive DML and embedded DML. Depending on the level of the language, DML can be divided into procedural DML and non-procedural DML two species. A commit is required.SELECTINSERTUPDATEDELETEMergecallexplainPLANLOCKTABLE

    3. DCL (Data Control Language) database Control Language Authorization, role control, etc.GRANTAuthorizedREVOKECancel Authorization
    4. TCL (TransactionControl Language) transaction Control Language SavePoint set save pointROLLBACKrolling backSET TRANSACTION

    SQL is divided into four main parts: (1) data definition. (SQL DDL) to define the creation and undo operations of SQL schemas, basic tables, views, and indexes. (2) Data manipulation. (SQL DML) data manipulation is divided into two categories: Data query and Data update. Data update is divided into three kinds of operations, inserting, deleting, and modifying. (3) Data Control. Includes authorization for basic tables and views, description of integrity rules, transaction control, and so on. (4) The use of Embedded SQL rules. involves embedding rules that SQL statements use in the host language program.

SQL Four languages: DDL,DML,DCL,TCL

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.