# SQL reference

> Every statement family the NYXDB engine accepts, mapped to its reference page.

One request carries one statement, at most 64 KiB. Keywords are
case-insensitive. Every example on these pages is copied from an engine test,
and the line under each example names that test; an example marked "Grammar
only" is proven by a parser test, not by execution.

## Statement map

| Statements | Page |
| --- | --- |
| Lexical rules, identifiers, literals, `?` parameters | [Syntax](/docs/sql/syntax) |
| Column types | [Data types](/docs/sql/data-types) |
| `CREATE TABLE` | [CREATE TABLE](/docs/sql/create-table) |
| `INSERT`, `UPSERT`, `REPLACE` | [INSERT](/docs/sql/insert) |
| `UPDATE`, `DELETE` | [UPDATE and DELETE](/docs/sql/update-delete) |
| `ALTER TABLE` | [ALTER TABLE](/docs/sql/alter) |
| `DROP TABLE`, `DROP INDEX`, `DROP VIEW`, `DROP TRANSFORMATION`, `DROP MATERIALIZED VIEW`, `DROP MATERIALIZATION` | [DROP](/docs/sql/drop) |
| `SELECT`, `WITH`, set operations, `AS OF COMMIT` | [SELECT](/docs/sql/select) |
| Joins | [Joins](/docs/sql/joins) |
| `CREATE VIEW`, `CREATE MATERIALIZED VIEW`, `CREATE MATERIALIZATION` | [Views](/docs/sql/views) |
| `CREATE TRANSFORMATION` | [CREATE TRANSFORMATION](/docs/sql/create-transformation) |
| `STREAM SELECT`, windows, `EMIT` | [Streaming](/docs/sql/streaming) |
| `SETTINGS` clause, `SET`, `RESET`, `SHOW SETTINGS` | [Settings](/docs/sql/settings) |
| `CREATE`/`ALTER`/`DROP USER`, `CREATE`/`ALTER`/`DROP API KEY` | [Users and API keys](/docs/sql/users-and-keys) |
| `CREATE SOURCE`, `CREATE CREDENTIAL`, `CREATE APPLICATION ACCESS`, `GRANT … TO APPLICATION ACCESS` | [Federation](/docs/sql/federation) |
| `SHOW TABLES`, `SHOW CREATE …`, `DESCRIBE` | [Introspection](/docs/sql/introspection) |
| Statement atomicity; no `BEGIN` or `COMMIT` | [Transactions](/docs/sql/transactions) |
| Functions, casts, `CASE`, aggregates | [Functions](/docs/sql/functions) |

## How statements are routed

- Credential statements (`USER`, `API KEY`) and federation statements are
  recognised before the relational parser and handled by their own services.
- `SET`, `RESET` and federation statements run on a WebSocket session; see
  [Protocol](/docs/drivers/protocol).
- `GRANT` and `REVOKE` manage the rights of users and roles; see
  [Governance](/docs/operations/governance).

---

Source: https://nyxdb.io/docs/sql/
