之前学习sql,并没有注意DDL,DML的区别。上网查了,发现很多版本相互矛盾的。最疑惑的是wiki和oracle里的竟然有不一致的。最后发现,oracle将GRANT和REVOKE也算到DDL里。所以,最终也算统一了,按wiki为准。
DDL
A data definition language or data description language (DDL) is a syntax similar to a computer programming language for defining data structures, especially database schemas.
- CREATE
- DROP
- ALTER
- RENAME
- TRUNCATE
DML
A data manipulation language (DML) is a family of syntax elements similar to a computer programming language used for selecting, inserting, deleting and updating data in a database.
- SELECT
- INSERT
- UPDATE
- DELETE
DCL
A data control language (DCL) is a syntax similar to a computer programming language used to control access to data stored in a database (Authorization).
- GRANT
- REVOKE
Reference
- https://en.wikipedia.org/wiki/Data_definition_language
- https://en.wikipedia.org/wiki/Data_manipulation_language
- http://docs.oracle.com/database/121/CNCPT/sqllangu.htm#CNCPT516