SQL language is divided into four categories: data query language DQL, data manipulation language DML, data definition language DDL, Data Control Language DCL.
-
Data query language DQL DQL data query language query block is the basic structure of the SELECT clause, FROM clause, WHERE clause consisting of:
SELECT <Field watches> FROM <table or view name> WHERE <query>
-
Data Manipulation Language DML Data Manipulation Language DML There are three main forms:
1) Insert: INSERT
2) Update: UPDATE
3) Delete: the DELETE data (table is deleted without deleting the table structure, can be rolled back)
-
Data Definition Language DDL
CREATE: create
ALTER: modify the table structure
RENAME: Modify the table or column name
DROP: When you delete the table structure and data, delete can not be rolled back
TRUNCATE: delete data in the table without deleting the table structure, it can not be rolled back after deletion efficient than DELETE
-
Data Control Language DCL
1) GRANT: Authorization
2) REVOKE: Recycling authority
There are transaction control statements TCL:
SAVEPOINT: savepoint
ROLLBACK: fall back to a point
COMMIT: commit the transaction