Learned database will certainly know DML, DDL and DCL three languages, this conceptual basis of what is necessary to keep in mind.
DML (Data Manipulation Lanaguage, data manipulation language)
DML is that we often use SELECT, INSERT, UPDATE, and DELETE statements, primarily used for data CRUD operations.
- query SELECT column name FROM table name - insert INSERT INTO table name (column 1, column 2, ...) VALUES (value 1, value 2, ....) - update UPDATE table name SET column name = The new value WHERE column name = conditional value - delete dELETE the FROM table name WHERE column name = conditional value
DDL (Data Definition Language, Data Definition Language)
DDL is that some statements we use when creating the table, such as CREATE, ALTER, DROP and so on. DDL is mainly used in the definition or changing the structure of the table, the data type, or the links between the tables and other constraint initialization work.
- Create a table the CREATE TABLE table name ( column name data type 1, column 2 data type name, column name 3 data type, .... ) - modify the table column names the ALTER TABLE table name the ALTER the COLUMN new column name for the new data types - delete a table DROP tABLE table name - delete the database DROP dATABASE database name
DCL (Data Control Language, a database control language)
DCL is used to set or change the database user or role privileges statements include GRANT, DENY, REVOKE and other statements, this level should be mainly DBA to do, but if you are a small company may still have to do, like deploying database when you do not how the line, especially in this user-driven ORACLE database.
"You will not suddenly appear, No. 4 in the next line."