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,ALTERandDROP. - Change rows with
INSERT,UPDATEandDELETE, optionally usingRETURNING. - Group changes with transaction and savepoint controls.
- Inspect server state with
SHOW, system relations andEXPLAIN.
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.