SQL language classification (DQL, DML, DDL, DCL)

SQL language classification

The SQL language is divided into 4 categories:

  • Data Query Language (DQL)
  • Data Manipulation Language (DML)
  • Data Definition Language (DDL)
  • Data Control Language (DCL)

Data Query Language (DQL)

DQL is used to query data .

Contained operation statements:SELECT

Data Manipulation Language (DML)

DML is used to manipulate the data contained in database objects .

Contained operation statements:

  • INSERT Insert data
  • UPDATE change the data
  • DELETE delete data

Data Definition Language (DDL)

DDL is used to manipulate the objects in the database and the objects themselves , including: databases, tables, views, indexes, synonyms, clusters, etc. ( DDL operations are submitted implicitly and cannot be Rollbacked )

Contained operation statements:

  • CREATE Create objects such as databases and tables
  • DROP Delete data tables, indexes, triggers, conditional constraints, and data table permissions, etc.
  • ALTER Modify data table definition and data attributes

Data Control Language (DCL)

DCL is used to grant or reclaim database object permissions, control the time and effect of database manipulation transactions, and monitor the database.

Contained operation statements:

  • GRANT Assign permissions to users
  • REVOKE Revoke the authority of a user in the database
  • ROLLBACK [WORK] TO [SAVEPOINT] Back to a certain point

Guess you like

Origin blog.csdn.net/qq_37164975/article/details/106132137