📄️ Statements Overview
📄️ ANALYZE Statement
The ANALYZE statement recomputes the statistics on Goose's tables.
📄️ ALTER TABLE Statement
The ALTER TABLE statement changes the schema of an existing table in the catalog.
📄️ ALTER VIEW Statement
The ALTER VIEW statement changes the schema of an existing view in the catalog.
📄️ ATTACH and DETACH Statements
Goose allows attaching to and detaching from database files.
📄️ CALL Statement
The CALL statement invokes the given table function and returns the results.
📄️ CHECKPOINT Statement
The CHECKPOINT statement synchronizes data in the write-ahead log (WAL) to the database data file.
📄️ COMMENT ON Statement
The COMMENT ON statement allows adding metadata to catalog entries (tables, columns, etc.).
📄️ COPY Statement
Examples
📄️ CREATE INDEX Statement
CREATE INDEX
📄️ CREATE MACRO Statement
The CREATE MACRO statement can create a scalar or table macro (function) in the catalog.
📄️ CREATE SCHEMA Statement
The CREATE SCHEMA statement creates a schema in the catalog. The default schema is main.
📄️ CREATE SECRET Statement
The CREATE SECRET statement creates a new secret in the Secrets Manager.
📄️ CREATE SEQUENCE Statement
The CREATE SEQUENCE statement creates a new sequence number generator.
📄️ CREATE TYPE Statement
The CREATE TYPE statement defines a new type in the catalog.
📄️ CREATE VIEW Statement
The CREATE VIEW statement defines a new view in the catalog.
📄️ CREATE TABLE Statement
The CREATE TABLE statement creates a table in the catalog.
📄️ DELETE Statement
The DELETE statement removes rows from the table identified by the table-name.
📄️ DESCRIBE Statement
The DESCRIBE statement shows the schema of a table, view or query.
📄️ DROP Statement
The DROP statement removes a catalog entry added previously with the CREATE command.
📄️ EXPORT and IMPORT DATABASE Statements
The EXPORT DATABASE command allows you to export the contents of the database to a specific directory. The IMPORT DATABASE command allows you to then read the contents again.
📄️ INSERT Statement
The INSERT statement inserts new data into a table.
📄️ LOAD / INSTALL Statements
INSTALL
📄️ MERGE INTO Statement
The MERGE INTO statement is an alternative to INSERT INTO ... ON CONFLICT that doesn't need a primary key since it allows for a custom match condition. This is a very useful alternative for upserting use cases (INSERT + UPDATE) when the destination table does not have a primary key constraint.
📄️ PIVOT Statement
The PIVOT statement allows distinct values within a column to be separated into their own columns.
📄️ Profiling Queries
Goose supports profiling queries via the EXPLAIN and EXPLAIN ANALYZE statements.
📄️ SELECT Statement
The SELECT statement retrieves rows from the database.
📄️ SET and RESET Statements
The SET statement modifies the provided Goose configuration option at the specified scope.
📄️ SET VARIABLE and RESET VARIABLE Statements
Goose supports the definition of SQL-level variables using the SET VARIABLE and RESET VARIABLE statements.
📄️ SHOW and SHOW DATABASE Statements
SHOW Statement
📄️ SUMMARIZE Statement
The SUMMARIZE statement returns summary statistics for a table, view or a query.
📄️ Transaction Management
Goose supports ACID database transactions.
📄️ UNPIVOT Statement
The UNPIVOT statement allows multiple columns to be stacked into fewer columns.
📄️ UPDATE Statement
The UPDATE statement modifies the values of rows in a table.
📄️ UPDATE EXTENSIONS
The UPDATE EXTENSIONS statement allows synchronizing the locally installed extension state with the repository that published a given extension.
📄️ USE Statement
The USE statement selects a database and optional schema, or just a schema to use as the default.
📄️ VACUUM Statement
The VACUUM statement only has basic support in Goose and is mostly provided for PostgreSQL-compatibility.