SQL reference
Introspection
SHOW TABLES, SHOW CREATE and DESCRIBE in NYXDB, and where the system relations take over.
Introspection statements read the catalog. SHOW CREATE … returns the
canonical definition of one object; SHOW TABLES and DESCRIBE are answered
from system relations.
SHOW CREATE
| Statement | Returns |
|---|---|
SHOW CREATE TABLE t | The table's definition. |
SHOW CREATE VIEW v | A logical view's definition. |
SHOW CREATE MATERIALIZED VIEW m | A materialized view's definition. |
SHOW CREATE MATERIALIZATION i | A materialization instance's definition. |
SHOW CREATE TRANSFORMATION x | A transformation's definition. |
SHOW CREATE TABLE and SHOW CREATE VIEW answer one row with the column
create_statement.
SHOW CREATE TABLE balances;SHOW CREATE VIEW address_balances;SHOW CREATE MATERIALIZED VIEW token_volume;SHOW CREATE MATERIALIZATION balances_chain_1;SHOW CREATE TRANSFORMATION balance_activity;The definition printed by SHOW CREATE TABLE re-runs as a valid
CREATE TABLE.
SHOW TABLES and DESCRIBE
SHOW TABLES;DESCRIBE TABLE balances;DESCRIBE also accepts DESC and may omit TABLE. The gateway answers
SHOW TABLES from system.tables and DESCRIBE from system.table_columns.
EXPLAIN, CANCEL QUERY and SHOW FUNCTIONS
EXPLAIN prints the plan of a statement, CANCEL QUERY stops a running query
by its id, and SHOW FUNCTIONS lists the function library. A client also stops
a request by sending a Cancel frame for its request id; see
Query lifecycle.
System relations
For everything beyond one object's definition — indexes and their builds, attribute groups, partitions, transformations and their revisions, lineage, queries, settings and credentials — read the system relations directly. See System relations.