# SQL statements

SQL statements read data, define schema objects and change rows. Server commands add managed database selection, settings and service introspection.

## Statement groups

* Read data with `SELECT`; combine sources with joins and set operations.
* Define tables, views, indexes and triggers with `CREATE`, `ALTER` and `DROP`.
* Change rows with `INSERT`, `UPDATE` and `DELETE`, optionally using `RETURNING`.
* Group changes with transaction and savepoint controls.
* Inspect server state with `SHOW`, system relations and `EXPLAIN`.

The [SQL syntax reference](https://coordinatordb.com/docs/reference/syntax) also covers `PRAGMA`, `ANALYZE`, `VACUUM INTO` and trigger declarations. `ATTACH` and `DETACH` operate through the embedded Connection API; server database management uses `CREATE DATABASE` and `USE`.

## Reference

* [ALTER TABLE](https://coordinatordb.com/docs/reference/statements/alter)

* [ATTACH](https://coordinatordb.com/docs/reference/statements/attach)

* [CREATE INDEX](https://coordinatordb.com/docs/reference/statements/create/create-index)

* [DELETE](https://coordinatordb.com/docs/reference/statements/delete)

* [DETACH](https://coordinatordb.com/docs/reference/statements/detach)

* [DROP](https://coordinatordb.com/docs/reference/statements/drop)

* [EXPLAIN](https://coordinatordb.com/docs/reference/statements/explain)

* [IN](https://coordinatordb.com/docs/reference/statements/in)

* [INSERT INTO](https://coordinatordb.com/docs/reference/statements/insert-into)

* [Rename a table](https://coordinatordb.com/docs/reference/statements/rename)

* [SELECT](https://coordinatordb.com/docs/reference/statements/select)

* [SET](https://coordinatordb.com/docs/reference/statements/set)

* [SHOW](https://coordinatordb.com/docs/reference/statements/show)

* [UPDATE](https://coordinatordb.com/docs/reference/statements/update)

* [USE](https://coordinatordb.com/docs/reference/statements/use)

* [CREATE TABLE](https://coordinatordb.com/docs/reference/statements/create/table)

* [CREATE DATABASE](https://coordinatordb.com/docs/reference/statements/create/database)

* [Temporary tables](https://coordinatordb.com/docs/reference/statements/create/table/temporary-table)

* [CREATE VIEW](https://coordinatordb.com/docs/reference/statements/create/view)
