DESCRIBE
DESCRIBE returns catalog metadata.
Synopsis
Section titled “Synopsis”{ DESCRIBE | DESC } [TABLE] table_name [FORMAT JSON]DESCRIBE DATABASE FORMAT JSONDescription
Section titled “Description”The tabular table form reports columns. FORMAT JSON returns the versioned table descriptor envelope; DATABASE is available only with FORMAT JSON.
Parameters
Section titled “Parameters”table_name names a relation. TABLE is optional. FORMAT JSON selects one JSON
value instead of the legacy tabular shape.
Result
Section titled “Result”The tabular result contains Field, Type, Null, Key, Default and
Extra. JSON mode returns one descriptor column and one row.
Transaction behavior
Section titled “Transaction behavior”DESCRIBE reads transaction-visible catalog metadata and makes no changes.
Errors and limitations
Section titled “Errors and limitations”A missing object fails. DESCRIBE DATABASE without FORMAT JSON is rejected.
Descriptor JSON is versioned and should be parsed by field, not by formatting.
Privileges
Section titled “Privileges”Table metadata requires CONNECT, schema USAGE and SELECT on the relation. Database-wide description is bootstrap-only.
Example
Section titled “Example”CREATE TABLE ref_describe ( id INTEGER PRIMARY KEY, title TEXT NOT NULL DEFAULT 'untitled');DESCRIBE ref_describe;See also
Section titled “See also”See Defining a Schema, SHOW and Protocol Internals.