Mysql DBA Advanced Operations Learning Note-sql Language introduction and classification

Source: Internet
Author: User
Tags dba reserved

8.1 What is SQL

SQL English full name is Structured query Language, Chinese meaning is structured query language. It is a language method for defining and manipulating data in a relational database. Is the industry standard supported by most relational database management systems.

8.2 Classification of SQL

The SQL Structured Query language consists of 6 parts.

First, data Query Language (DQL)

DQL Full name Data Query Language, the statement also becomes the database retrieval statement, the function is obtains the data from the table, determines how the data is given in the program. The keyword Select is the most common verb used by DQL (and all SQL), and the other dql commonly used reserved words are where,order by,group by and having.
These dql reserved words are often used with other types of SQL statements, such as:
Mysql> Select User,host from Mysql.user order by Asc\desc;

Ii. Data Manipulation Language (DML)
DML full name Data manipulation Language, whose statements include verb insert,update and delete. They are used to add, modify, and delete rows (data) in a table, respectively. Also known as the action query language. Specific statements such as:
Mysql> Delete from mysql.user where host= ' localhost ';
Query OK, 2 rows affected (0.10 sec)

Iii. Transaction Processing Language (TRL)
Its statement ensures that all rows of the table affected by the DML statement are updated in a timely manner, and the TPL statements include Begin,transaction,commit and rollback. The main understanding of the latter two.

Iv. Data Control Language (DCL)
DCL Full Name (Data Control Language) It acquires a license (authorization and cancellation) in the statement through grant or revoke.

V. Data definition language (DDL)
Full Name (Data Definition Language), whose statements include verb create and drop, create a new table in the database or delete a table (creat table or drop tables), add indexes to the table, and so on.

Six, pointer Control language (CCL)
The full name of the CURSOR Control Language, its statements like declare cursor,fetch into and update WHERE current are used to manipulate one or more tables individually.

Summary: The most common classification of SQL statements is generally 3 categories:

DDL Data Definition Language (CREATE,ALTER,DROOP) operations must be

DML Data Manipulation Language (select,insert,delete,update) development

DCL Data Control Language (grant,revoke,commit,rollback) operation and maintenance must be

Mysql DBA Advanced Operations Learning Note-sql Language introduction and classification

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.