SQL language classification

Source: Internet
Author: User

There are four types of SQL languages: Data Query Language DQL and data manipulation language DML,

Data Definition Language DDL and data control language DCL.

1. Data Query Language DQL
The basic structure of Data Query Language DQL is composed of SELECT clause, FROM clause, WHERE
Query block composed of clauses:
SELECT <field table>
FROM <Table or view Name>
WHERE <query condition>

2. Data manipulation language
The data manipulation language DML has three forms:
1) INSERT: INSERT
2) UPDATE: UPDATE
3) DELETE: DELETE

3. Data Definition Language DDL
Data Definition Language (DDL) is used to create various objects in a database-tables, views,
Indexes, synonyms, and clustering, for example:
Create table/VIEW/INDEX/SYN/CLUSTER
|
Table View index synonym Cluster

4. Data Control Language DCL
The Data Control Language DCL is used to grant or revoke some privileges to access the database and Control
The time and Effect of database operations and transactions, and the monitoring of the database. For example:
1) GRANT: authorization.
2) ROLLBACK [WORK] TO [SAVEPOINT]: roll back TO a certain point.
ROLLBACK --- ROLLBACK
The rollback command returns the database status to the last submitted status. The format is:
SQL> ROLLBACK;
3) COMMIT [WORK]: Submit.
During database insertion, deletion, and modification operations, only when the transaction is committed to the data
The database is complete. Before the transaction is committed, only the person who operates the database can view
You can only see what you do after the final submission.
You can submit data explicitly, implicitly, or automatically. Points below
Do not describe these three types.
(1) explicit submission
You can use the COMMIT command to directly submit an object explicitly. The format is:
SQL> COMMIT;
(2) Implicit commit
The SQL command is used for implicit submission. These commands are:
ALTER, AUDIT, COMMENT, CONNECT, CREATE, DISCONNECT, DROP,
EXIT, GRANT, NOAUDIT, QUIT, REVOKE, RENAME.
(3) automatic submission
If AUTOCOMMIT is set to ON, after the insert, modify, or delete statement is executed,
The system will automatically submit. The format is:
SQL> SET AUTOCOMMIT ON;

 

The above content from: http://zhidao.baidu.com/link? Url = eM8CXZ2kl8QqTgK3KV-feVeZnabOlQHTULHUu09sXiQ43uAyQKRfpDLaSfhwrHz8BUZUNOcA39NJHz-0SnyDLa

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.