A brief introduction to DDL,DML,DCL,TCL four languages

Source: Internet
Author: User

1.DDL(data definition Language) database definition language Statements are used to define the database structure or schema.

DDL is one of the four functions of SQL language.
Used to define the three-level structure of the database, including the external schema, conceptual mode, internal mode and its mutual image, define data integrity, security control, and other constraints
DDL does not require a commit.
CREATE
Alter
DROP
TRUNCATE
COMMENT
RENAME

2.DML(datamanipulation Language) Manipulation Language statements are used for managing Schema objects.

Provided by the DBMS for use by users or programmers to manipulate data in the database.
DML is divided into two classes of interactive DML and embedded DML.
Depending on the level of the language, DML can be divided into two kinds of procedural and non procedural DML.
Need a commit.
SELECT
INSERT
UPDATE
DELETE
MERGE
Call
EXPLAIN Plan
LOCK TABLE

3.DCL(Data Control Language) Database controls Language authorization, role control, etc.
Grant Authorization
REVOKE Cancel Authorization

4.TCL(Transaction control Language) transaction Controls Language
SavePoint Settings Save Point
ROLLBACK Roll Back
SET TRANSACTION

SQL is divided into four main parts :
(1) Data definition. (SQL DDL) defines 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. The data update is divided into three kinds of operations, insert, delete, and modify.
(3) Data control. Includes authorization of basic tables and views, description of integrity rules, transaction control, and so on.
(4) The use of Embedded SQL rules. involves rules that SQL statements use in host language programs.

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.