Skip to main content
Structured Query Language (SQL) is the industry-standard language for interacting with relational databases. Pronounced “S-Q-L” or “sequel,” SQL is governed by ANSI/ISO, with each vendor—such as Microsoft’s T-SQL or Oracle’s PL/SQL—adding its own extensions. Mastering standard SQL lets you work across virtually any relational database. Although SQL suggests only querying, it actually consists of three sublanguages:
  • Data Manipulation Language (DML): retrieve and modify data
  • Data Definition Language (DDL): create, alter, and drop database objects
  • Data Control Language (DCL): manage user permissions
The image is an informational graphic about Structured Query Language (SQL), explaining its ANSI/ISO standard, common names, vendor-specific features, and its three parts: Data Manipulation Language (DML), Data Definition Language (DDL), and Data Control Language (DCL).

Data Manipulation Language (DML)

DML is where you spend most of your SQL time. Each DML statement begins with one of these commands: Common clauses include:
  • FROM: specify source table(s)
  • JOIN: combine rows from multiple tables
  • WHERE: filter rows affected by the statement

SELECT

Retrieve data from a Customer table:
This returns the row where CustomerId equals 0001.

UPDATE

Modify an existing row:
Only the LastName for customer 0001 is updated.

DELETE

Always include a WHERE clause in a DELETE statement. Omitting it will remove all rows from the table.
This deletes only the matching customer.

INSERT

Add a new record:
This creates a new row with the specified values.

Data Definition Language (DDL)

DDL statements manage database structures—tables, views, indexes, and more.
The image describes three additional statements in Data Definition Language: "Create" to add a table, "Drop" to remove a table, and "Alter" to add, rename, or change columns in a table.

Data Control Language (DCL)

DCL commands grant or revoke permissions to users and roles:
The image explains two Data Control Language (DCL) statements: "Grant" to allow user access to a table, and "Revoke" to remove user access, both for DDL and DML operations.

References

Watch Video