DML is a sub language of SQL which describes the syntax of the retrieving and manipulating of database records.
Statements
DML consists of several core statements for working with data:
Retrieve data from tables. The SELECT statement includes:
- Basic querying and column selection
- DISTINCT values
- Filtering with WHERE clause
- Subqueries and set membership (IN, NOT IN, EXISTS, NOT EXISTS)
- Set comparison operators (ANY, ALL)
- Ordering results with ORDER BY
- Limiting results with LIMIT
Add new records to tables.
Modify existing records in tables.
Remove records from tables.
Advanced Operations
Combine rows from multiple tables based on related columns. Includes:
- INNER JOIN
- LEFT JOIN
- RIGHT JOIN
- FULL OUTER JOIN
Combine results from multiple queries using Set theory operations:
Perform calculations on multiple rows:
- COUNT, SUM, AVG, MIN, MAX
- GROUP BY clause
- HAVING clause for filtering grouped results