SQL statement types

SQL statements are grouped into three main logical groups:

Data Definition Language (DDL) Data Control Language (DCL) Data Manipulation Language (DML)

DDL

Use DDL statements to create, modify, and remove tables and other objects in a database.

  • CREATE
  • ALTER
  • DROP
  • RENAME

DCL

Use DCL statements to manage access to objects in a database by granting, denying, or revoking permissions to specific users or groups.

  • GRANT
  • DENY
  • REVOKE

DML

use DML statements to manipulate the rows in tables. These statements enable you to retrieve (query) data, insert new rows, or modify existing rows. You can also delete rows if you don’t need them anymore.

  • SELECT
  • INSERT
  • UPDATE
  • DELETE

References

SQL statement types

Last modified July 21, 2024: update (e2ae86c)