Database operations Type Description Language (DDL, DML, DQL, DCL)

Original link: https://www.cnblogs.com/tanjiyuan/p/11049458.html

Data Definition Language DDL

DDL data definition language used to create the various objects in the database ----- table, view, index, synonyms, and other such clusters:
the CREATE TABLE / the VIEW / the INDEX / the SYN / the CLUSTER
DDL operations are recessive submitted! Can not be rolled back

Data Manipulation Language DML

Data Manipulation Language DML three major forms: CRUD

  1. Insert: INSERT
  2. Update: UPDATE
  3. Delete: DELETE

Data query language DQL

Data query language query block DQL basic structure is a SELECT clause, FROM clause, WHERE clause consisting of:
SELECT <Field watches>
the FROM <table or view name>
the WHERE <query>

Data Control Language DCL

Data Control Language or DCL used to grant certain privileges to access the database recovery, and control the time and the effect of manipulating the database transaction occurs, the implementation of monitoring databases. Such as:

  1. GRANT: authorization.
  2. ROLLBACK [WORK] TO [SAVEPOINT] : fall back to a certain point.
    -ROLLBACK rollback
    Rollback command to bring the database back to the state status of the last final submission. The format is:
    SQL> ROLLBACK
  3. COMMIT [WORK]: submitted.
    In the database insert, delete and modify operations when, and only when the transaction is not complete when submitted to the database. Before the transaction commits, this is the only person to operate the database in order to have the right to see things done, others only after the completion of the final submission can be seen. There are three types of data submitted to: submit explicit, implicit commit and automatic submission. The following illustrate these three types.
    (1) Explicit submitted
    with complete COMMIT command submitted directly to explicitly commit. The format is:
    SQL> a COMMIT;
    (2) implicitly commit
    filed in the SQL command is done indirectly implicit commit. These commands are:
    the ALTER, the AUDIT, the COMMENT, the CONNECT, the CREATE, DISCONNECT, DROP,
    EXIT, GRANT, the NOAUDIT, the QUIT, REVOKE, RENAME.
    (3) automatically submitted
    if the AUTOCOMMIT is set to ON, the insert, update, delete statement is executed,
    the system will automatically be submitted, which is automatically submitted. The format is:
    the SQL> the AUTOCOMMIT the ON the SET;

Guess you like

Origin blog.csdn.net/weixin_43135618/article/details/100539512