A, DML
DML (data manipulation language) data manipulation language:
We often use the INSERT, DELETE, UPDATE, SELECT statements. Mainly used for some data in the database operation.
The INSERT the INTO table_name (column 1, column 2, ...) the VALUES (value 1, value 2, ....) the DELETE the FROM table name WHERE column name = value UPDATE table name SET column name = the new value WHERE column name = a value SELECT column names FROM table name
Two, DDL
DDL (data definition language) database definition language, such as:
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
In fact, what we used when creating the table some sql, for example: CREATE, ALTER, DROP and so on. DDL is mainly used in the structure or changing the definition table, the data type, the link between the tables and constraints initialization work
The CREATE TABLE table name ( Column Name Data Type 1, column 2 the data type name, column name data type 3, .... ) the ALTER TABLE table_name the ALTER the COLUMN column_name DataType the DROP TABLE table name the DROP DATABASE database name
Three, DCL
DCL (Data Control Language) database control language:
It is used to set or change the database user or role privileges statements, such as:
1) GRANT: Authorization
2) REVOKE: Recycling authority