Skip to content

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 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 ​