SQL Grammar

Tip:

This page describes the full CockroachDB SQL grammar. However, as a starting point, it's best to reference our SQL statements pages first, which provide detailed explanations and examples.

stmt_block:

stmt

no references


stmt:

HELPTOKEN stmt_without_legacy_transaction legacy_transaction_stmt

referenced by:


stmt_without_legacy_transaction:

preparable_stmt analyze_stmt copy_stmt comment_stmt execute_stmt deallocate_stmt discard_stmt grant_stmt prepare_stmt revoke_stmt savepoint_stmt reassign_owned_by_stmt drop_owned_by_stmt release_stmt refresh_stmt nonpreparable_set_stmt transaction_stmt close_cursor_stmt declare_cursor_stmt fetch_cursor_stmt move_cursor_stmt unlisten_stmt show_commit_timestamp_stmt

referenced by:


legacy_transaction_stmt:

legacy_begin_stmt legacy_end_stmt

referenced by:


preparable_stmt:

alter_stmt backup_stmt cancel_stmt create_stmt delete_stmt drop_stmt explain_stmt import_stmt insert_stmt pause_stmt reset_stmt restore_stmt resume_stmt export_stmt scrub_stmt select_stmt preparable_set_stmt show_stmt truncate_stmt update_stmt upsert_stmt

referenced by:


analyze_stmt:

ANALYZE ANALYSE analyze_target

referenced by:


copy_stmt:

COPY table_name opt_column_list FROM STDIN opt_with_copy_options opt_where_clause TO STDOUT opt_with_copy_options ( copy_to_stmt ) TO STDOUT opt_with_copy_options

referenced by:


comment_stmt:

COMMENT ON DATABASE database_name SCHEMA qualifiable_schema_name TABLE CONSTRAINT constraint_name ON table_name COLUMN column_path INDEX table_index_name IS comment_text

referenced by:


execute_stmt:

EXECUTE table_alias_name execute_param_clause

referenced by:


deallocate_stmt:

DEALLOCATE PREPARE name ALL

referenced by:


discard_stmt:

DISCARD ALL SEQUENCES TEMP TEMPORARY

referenced by:


grant_stmt:

GRANT privileges ON grant_targets TYPE target_types ALL SEQUENCES TABLES FUNCTIONS IN SCHEMA schema_name_list SYSTEM privileges TO role_spec_list opt_with_grant_option privilege_list TO role_spec_list WITH ADMIN OPTION

referenced by:


prepare_stmt:

PREPARE table_alias_name prep_type_clause AS preparable_stmt

referenced by:


revoke_stmt:

REVOKE privileges ON grant_targets TYPE target_types ALL TABLES SEQUENCES FUNCTIONS IN SCHEMA schema_name_list ADMIN OPTION FOR privilege_list SYSTEM privileges GRANT OPTION FOR privileges ON grant_targets TYPE target_types ALL TABLES FUNCTIONS IN SCHEMA schema_name_list SYSTEM privileges FROM role_spec_list

referenced by:


savepoint_stmt:

SAVEPOINT name

referenced by:


reassign_owned_by_stmt:

REASSIGN OWNED BY role_spec_list TO role_spec

referenced by:


drop_owned_by_stmt:

DROP OWNED BY role_spec_list opt_drop_behavior

referenced by:


release_stmt:

RELEASE savepoint_name

referenced by:


refresh_stmt:

REFRESH MATERIALIZED VIEW opt_concurrently view_name opt_clear_data

referenced by:


nonpreparable_set_stmt:

set_transaction_stmt

referenced by:


transaction_stmt:

begin_stmt commit_stmt rollback_stmt abort_stmt

referenced by:


close_cursor_stmt:

CLOSE ALL cursor_name

referenced by:


declare_cursor_stmt:

DECLARE cursor_name opt_binary opt_sensitivity opt_scroll CURSOR opt_hold FOR select_stmt

referenced by:


fetch_cursor_stmt:

FETCH cursor_movement_specifier

referenced by:


move_cursor_stmt:

MOVE cursor_movement_specifier

referenced by:


unlisten_stmt:

UNLISTEN type_name *

referenced by:


show_commit_timestamp_stmt:

SHOW COMMIT TIMESTAMP

referenced by:


legacy_begin_stmt:

BEGIN opt_transaction begin_transaction

referenced by:


legacy_end_stmt:

END opt_transaction

referenced by:


alter_stmt:

alter_ddl_stmt alter_role_stmt

referenced by:


backup_stmt:

BACKUP opt_backup_targets INTO sconst_or_placeholder LATEST IN string_or_placeholder_opt_list opt_as_of_clause TO string_or_placeholder_opt_list opt_as_of_clause opt_incremental opt_with_backup_options

referenced by:


cancel_stmt:

cancel_jobs_stmt cancel_queries_stmt cancel_sessions_stmt cancel_all_jobs_stmt

referenced by:


create_stmt:

create_role_stmt create_ddl_stmt create_stats_stmt create_changefeed_stmt create_extension_stmt create_external_connection_stmt create_schedule_stmt

referenced by:


delete_stmt:

opt_with_clause DELETE FROM table_expr_opt_alias_idx opt_using_clause opt_where_clause opt_sort_clause opt_limit_clause returning_clause

referenced by:


drop_stmt:

drop_ddl_stmt drop_role_stmt drop_schedule_stmt drop_external_connection_stmt

referenced by:


explain_stmt:

EXPLAIN ANALYZE ANALYSE ( explain_option_list ) explainable_stmt

referenced by:


import_stmt:

IMPORT TABLE table_name FROM import_format string_or_placeholder INTO table_name ( insert_column_list ) import_format DATA ( string_or_placeholder_list ) opt_with_options

referenced by:


insert_stmt:

opt_with_clause INSERT INTO insert_target insert_rest on_conflict returning_clause

referenced by:


pause_stmt:

pause_jobs_stmt pause_schedules_stmt pause_all_jobs_stmt

referenced by:


reset_stmt:

reset_session_stmt reset_csetting_stmt

referenced by:


restore_stmt:

RESTORE backup_targets SYSTEM USERS FROM string_or_placeholder IN list_of_string_or_placeholder_opt_list opt_as_of_clause opt_with_restore_options

referenced by:


resume_stmt:

resume_jobs_stmt resume_schedules_stmt resume_all_jobs_stmt

referenced by:


export_stmt:

EXPORT INTO import_format string_or_placeholder opt_with_options FROM select_stmt

referenced by:


scrub_stmt:

scrub_table_stmt scrub_database_stmt

referenced by:


select_stmt:

select_no_parens select_with_parens

referenced by:


preparable_set_stmt:

set_session_stmt set_local_stmt set_csetting_stmt use_stmt

referenced by:


show_stmt:

show_backup_stmt show_columns_stmt show_constraints_stmt show_create_stmt show_create_schedules_stmt show_create_external_connections_stmt show_databases_stmt show_enums_stmt show_types_stmt show_functions_stmt show_grants_stmt show_indexes_stmt show_partitions_stmt show_jobs_stmt show_locality_stmt show_schedules_stmt show_statements_stmt show_ranges_stmt show_range_for_row_stmt show_regions_stmt show_survival_goal_stmt show_roles_stmt show_savepoint_stmt show_schemas_stmt show_sequences_stmt show_session_stmt show_sessions_stmt show_stats_stmt show_tables_stmt show_trace_stmt show_transactions_stmt show_transfer_stmt show_users_stmt show_zone_stmt show_full_scans_stmt show_default_privileges_stmt

referenced by:


truncate_stmt:

TRUNCATE opt_table relation_expr_list opt_drop_behavior

referenced by:


update_stmt:

opt_with_clause UPDATE table_expr_opt_alias_idx SET set_clause_list opt_from_list opt_where_clause opt_sort_clause opt_limit_clause returning_clause

referenced by:


upsert_stmt:

opt_with_clause UPSERT INTO insert_target insert_rest returning_clause

referenced by:


analyze_target:

table_name

referenced by:


table_name:

db_object_name

referenced by:


opt_column_list:

( name_list )

referenced by:


opt_with_copy_options:

opt_with copy_options_list ( copy_generic_options_list )

referenced by:


opt_where_clause:

where_clause

referenced by:


copy_to_stmt:

delete_stmt insert_stmt select_stmt update_stmt upsert_stmt

referenced by:


database_name:

name

referenced by:


comment_text:

SCONST NULL

referenced by:


qualifiable_schema_name:

name . name

referenced by:


column_path:

name prefixed_column_path

referenced by:


table_index_name:

table_name @ index_name standalone_index_name

referenced by:


constraint_name:

name

referenced by:


table_alias_name:

name

referenced by:


execute_param_clause:

( expr_list )

referenced by:


name:

identifier unreserved_keyword col_name_keyword

referenced by:


privileges:

ALL opt_privileges_clause privilege_list

referenced by:


grant_targets:

identifier col_name_keyword unreserved_keyword complex_table_pattern SEQUENCE table_pattern , TABLE table_pattern_list DATABASE EXTERNAL CONNECTION name_list FUNCTION function_with_paramtypes_list

referenced by:


role_spec_list:

role_spec ,

referenced by:


opt_with_grant_option:

WITH GRANT OPTION

referenced by:


privilege_list:

privilege ,

referenced by:


target_types:

type_name_list

referenced by:


schema_name_list:

qualifiable_schema_name ,

referenced by:


prep_type_clause:

( type_list )

referenced by:


role_spec:

identifier unreserved_keyword CURRENT_USER SESSION_USER

referenced by:


opt_drop_behavior:

CASCADE RESTRICT

referenced by:


savepoint_name:

SAVEPOINT name

referenced by:


opt_concurrently:

CONCURRENTLY

referenced by:


view_name:

table_name

referenced by:


opt_clear_data:

WITH NO DATA

referenced by:


set_transaction_stmt:

SET SESSION TRANSACTION transaction_mode_list

referenced by:


begin_stmt:

START TRANSACTION begin_transaction

referenced by:


commit_stmt:

COMMIT opt_transaction

referenced by:


rollback_stmt:

ROLLBACK opt_transaction TO savepoint_name

referenced by:


abort_stmt:

ABORT opt_abort_mod

referenced by:


cursor_name:

name

referenced by:


opt_binary:

BINARY

referenced by:


opt_sensitivity:

INSENSITIVE ASENSITIVE

referenced by:


opt_scroll:

NO SCROLL

referenced by:


opt_hold:

WITH WITHOUT HOLD

referenced by:


cursor_movement_specifier:

from_or_in next_prior forward_backward ABSOLUTE RELATIVE signed_iconst64 FIRST LAST opt_forward_backward signed_iconst64 ALL opt_from_or_in cursor_name

referenced by:


type_name:

db_object_name

referenced by:


opt_transaction:

TRANSACTION

referenced by:


begin_transaction:

transaction_mode_list

referenced by:


alter_ddl_stmt:

alter_table_stmt alter_index_stmt alter_view_stmt alter_sequence_stmt alter_database_stmt alter_range_stmt alter_partition_stmt alter_schema_stmt alter_type_stmt alter_default_privileges_stmt alter_changefeed_stmt alter_backup_stmt alter_func_stmt alter_backup_schedule

referenced by:


alter_role_stmt:

ALTER role_or_group_or_user IF EXISTS role_spec opt_role_options opt_in_database set_or_reset_clause ROLE_ALL USER_ALL ALL opt_in_database set_or_reset_clause

referenced by:


opt_backup_targets:

backup_targets

referenced by:


sconst_or_placeholder:

SCONST PLACEHOLDER

referenced by:


string_or_placeholder_opt_list:

string_or_placeholder ( string_or_placeholder_list )

referenced by:


opt_as_of_clause:

as_of_clause

referenced by:


opt_with_backup_options:

WITH backup_options_list OPTIONS ( backup_options_list )

referenced by:


opt_incremental:

INCREMENTAL FROM string_or_placeholder_list

referenced by:


cancel_jobs_stmt:

CANCEL JOB a_expr JOBS select_stmt for_schedules_clause

referenced by:


cancel_queries_stmt:

CANCEL QUERY IF EXISTS a_expr QUERIES IF EXISTS select_stmt

referenced by:


cancel_sessions_stmt:

CANCEL SESSION IF EXISTS a_expr SESSIONS IF EXISTS select_stmt

referenced by:


cancel_all_jobs_stmt:

CANCEL ALL name JOBS

referenced by:


create_role_stmt:

CREATE role_or_group_or_user IF NOT EXISTS role_spec opt_role_options

referenced by:


create_ddl_stmt:

create_database_stmt create_index_stmt create_schema_stmt create_table_stmt create_table_as_stmt create_type_stmt create_view_stmt create_sequence_stmt create_func_stmt

referenced by:


create_stats_stmt:

CREATE STATISTICS statistics_name opt_stats_columns FROM create_stats_target opt_create_stats_options

referenced by:


create_changefeed_stmt:

CREATE CHANGEFEED FOR changefeed_targets opt_changefeed_sink opt_with_options opt_changefeed_sink opt_with_options AS SELECT target_list FROM changefeed_target_expr opt_where_clause

referenced by:


create_extension_stmt:

CREATE EXTENSION IF NOT EXISTS name

referenced by:


create_external_connection_stmt:

CREATE EXTERNAL CONNECTION label_spec AS string_or_placeholder

referenced by:


create_schedule_stmt:

create_schedule_for_changefeed_stmt create_schedule_for_backup_stmt

referenced by:


opt_with_clause:

with_clause

referenced by:


table_expr_opt_alias_idx:

table_name_opt_idx AS table_alias_name

referenced by:


opt_using_clause:

USING from_list

referenced by:


opt_sort_clause:

sort_clause

referenced by:


opt_limit_clause:

limit_clause

referenced by:


returning_clause:

RETURNING target_list NOTHING

referenced by:


drop_ddl_stmt:

drop_database_stmt drop_index_stmt drop_table_stmt drop_view_stmt drop_sequence_stmt drop_schema_stmt drop_type_stmt drop_func_stmt

referenced by:


drop_role_stmt:

DROP role_or_group_or_user IF EXISTS role_spec_list

referenced by:


drop_schedule_stmt:

DROP SCHEDULE a_expr SCHEDULES select_stmt

referenced by:


drop_external_connection_stmt:

DROP EXTERNAL CONNECTION string_or_placeholder

referenced by:


explainable_stmt:

preparable_stmt comment_stmt execute_stmt

referenced by:


explain_option_list:

explain_option_name ,

referenced by:


import_format:

name

referenced by:


string_or_placeholder:

non_reserved_word_or_sconst PLACEHOLDER

referenced by:


opt_with_options:

WITH kv_option_list OPTIONS ( kv_option_list )

referenced by:


insert_column_list:

insert_column_item ,

referenced by:


string_or_placeholder_list:

string_or_placeholder ,

referenced by:


insert_target:

table_name AS table_alias_name

referenced by:


insert_rest:

( insert_column_list ) select_stmt DEFAULT VALUES

referenced by:


on_conflict:

ON CONFLICT DO NOTHING ( name_list ) opt_where_clause ON CONSTRAINT constraint_name DO NOTHING UPDATE SET set_clause_list opt_where_clause

referenced by:


pause_jobs_stmt:

PAUSE JOB a_expr WITH REASON = string_or_placeholder JOBS select_stmt WITH REASON = string_or_placeholder for_schedules_clause

referenced by:


pause_schedules_stmt:

PAUSE SCHEDULE a_expr SCHEDULES select_stmt

referenced by:


pause_all_jobs_stmt:

PAUSE ALL name JOBS

referenced by:


reset_session_stmt:

RESET SESSION session_var RESET_ALL ALL

referenced by:


reset_csetting_stmt:

RESET CLUSTER SETTING var_name

referenced by:


list_of_string_or_placeholder_opt_list:

string_or_placeholder_opt_list ,

referenced by:


opt_with_restore_options:

WITH restore_options_list OPTIONS ( restore_options_list )

referenced by:


backup_targets:

identifier col_name_keyword unreserved_keyword complex_table_pattern table_pattern , TABLE table_pattern_list DATABASE name_list

referenced by:


resume_jobs_stmt:

RESUME JOB a_expr JOBS select_stmt for_schedules_clause

referenced by:


resume_schedules_stmt:

RESUME SCHEDULE a_expr SCHEDULES select_stmt

referenced by:


resume_all_jobs_stmt:

RESUME ALL name JOBS

referenced by:


scrub_table_stmt:

EXPERIMENTAL SCRUB TABLE table_name opt_as_of_clause opt_scrub_options_clause

referenced by:


scrub_database_stmt:

EXPERIMENTAL SCRUB DATABASE database_name opt_as_of_clause

referenced by:


select_no_parens:

simple_select select_clause sort_clause opt_sort_clause for_locking_clause opt_select_limit select_limit opt_for_locking_clause with_clause select_clause sort_clause opt_sort_clause for_locking_clause opt_select_limit select_limit opt_for_locking_clause

referenced by:


select_with_parens:

( select_no_parens select_with_parens )

referenced by:


set_session_stmt:

SET SESSION set_rest_more CHARACTERISTICS AS TRANSACTION transaction_mode_list set_rest_more

referenced by:


set_local_stmt:

SET LOCAL set_rest

referenced by:


set_csetting_stmt:

SET CLUSTER SETTING var_name to_or_eq var_value

referenced by:


use_stmt:

USE var_value

referenced by:


show_backup_stmt:

SHOW BACKUPS IN string_or_placeholder_opt_list BACKUP show_backup_details FROM string_or_placeholder IN string_or_placeholder_opt_list SCHEMAS FILES RANGES VALIDATE string_or_placeholder string_or_placeholder IN string_or_placeholder_opt_list opt_with_show_backup_options CONNECTION string_or_placeholder opt_with_show_backup_connection_options_list

referenced by:


show_columns_stmt:

SHOW COLUMNS FROM table_name with_comment

referenced by:


show_constraints_stmt:

SHOW CONSTRAINT CONSTRAINTS FROM table_name with_comment

referenced by:


show_create_stmt:

SHOW CREATE table_name opt_show_create_format_options ALL SCHEMAS TABLES TYPES

referenced by:


show_create_schedules_stmt:

SHOW CREATE ALL SCHEDULES SCHEDULE a_expr

referenced by:


show_create_external_connections_stmt:

SHOW CREATE ALL EXTERNAL CONNECTIONS EXTERNAL CONNECTION string_or_placeholder

referenced by:


show_databases_stmt:

SHOW DATABASES with_comment

referenced by:


show_enums_stmt:

SHOW ENUMS FROM name . name

referenced by:


show_types_stmt:

SHOW TYPES

referenced by:


show_functions_stmt:

SHOW FUNCTIONS FROM name . name

referenced by:


show_grants_stmt:

SHOW GRANTS opt_on_targets_roles SYSTEM GRANTS for_grantee_clause

referenced by:


show_indexes_stmt:

SHOW INDEX INDEXES KEYS FROM table_name DATABASE database_name with_comment

referenced by:


show_partitions_stmt:

SHOW PARTITIONS FROM TABLE table_name DATABASE database_name INDEX table_index_name table_name @ *

referenced by:


show_jobs_stmt:

SHOW AUTOMATIC JOBS JOBS WHEN COMPLETE select_stmt for_schedules_clause CHANGEFEED JOBS select_stmt JOB a_expr JOB WHEN COMPLETE a_expr

referenced by:


show_locality_stmt:

SHOW LOCALITY

referenced by:


show_schedules_stmt:

SHOW schedule_state SCHEDULES opt_schedule_executor_type SCHEDULE a_expr

referenced by:


show_statements_stmt:

SHOW ALL opt_cluster statements_or_queries

referenced by:


show_ranges_stmt:

SHOW RANGES FROM INDEX table_index_name TABLE table_name DATABASE database_name CURRENT_CATALOG CLUSTER RANGES opt_show_ranges_options

referenced by:


show_range_for_row_stmt:

SHOW RANGE FROM TABLE table_name INDEX table_index_name FOR ROW ( expr_list )

referenced by:


show_regions_stmt:

SHOW REGIONS FROM CLUSTER DATABASE database_name ALL DATABASES SUPER REGIONS FROM DATABASE database_name

referenced by:


show_survival_goal_stmt:

SHOW SURVIVAL GOAL FROM DATABASE database_name

referenced by:


show_roles_stmt:

SHOW ROLES

referenced by:


show_savepoint_stmt:

SHOW SAVEPOINT STATUS

referenced by:


show_schemas_stmt:

SHOW SCHEMAS FROM name

referenced by:


show_sequences_stmt:

SHOW SEQUENCES FROM name

referenced by:


show_session_stmt:

SHOW SESSION session_var

referenced by:


show_sessions_stmt:

SHOW ALL opt_cluster SESSIONS

referenced by:


show_stats_stmt:

SHOW STATISTICS FOR TABLE table_name opt_with_options

referenced by:


show_tables_stmt:

SHOW TABLES FROM name . name with_comment

referenced by:


show_trace_stmt:

SHOW opt_compact KV TRACE FOR SESSION

referenced by:


show_transactions_stmt:

SHOW ALL opt_cluster TRANSACTIONS

referenced by:


show_transfer_stmt:

SHOW TRANSFER STATE WITH SCONST

referenced by:


show_users_stmt:

SHOW USERS

referenced by:


show_zone_stmt:

SHOW ZONE CONFIGURATION FROM RANGE zone_name DATABASE database_name TABLE table_name INDEX table_index_name opt_partition PARTITION partition_name OF TABLE table_name INDEX table_index_name CONFIGURATIONS ALL ZONE CONFIGURATIONS

referenced by:


show_full_scans_stmt:

SHOW FULL TABLE SCANS

referenced by:


show_default_privileges_stmt:

SHOW DEFAULT PRIVILEGES opt_for_roles FOR GRANTEE role_spec_list ALL ROLES opt_in_schema

referenced by:


opt_table:

TABLE

referenced by:


relation_expr_list:

relation_expr ,

referenced by:


set_clause_list:

set_clause ,

referenced by:


opt_from_list:

FROM from_list

referenced by:


db_object_name:

simple_db_object_name complex_db_object_name

referenced by:


name_list:

name ,

referenced by:


opt_with:

WITH

referenced by:


copy_options_list:

copy_options

referenced by:


copy_generic_options_list:

copy_generic_options ,

referenced by:


where_clause:

WHERE a_expr

referenced by:


prefixed_column_path:

db_object_name_component . unrestricted_name . unrestricted_name . unrestricted_name

referenced by:


index_name:

unrestricted_name

referenced by:


standalone_index_name:

db_object_name

referenced by:


expr_list:

a_expr ,

referenced by:


unreserved_keyword:

ABORT ABSOLUTE ACTION ACCESS ADD ADMIN AFTER AGGREGATE ALTER ALWAYS ASENSITIVE AS_JSON AT ATOMIC ATTRIBUTE AUTOMATIC AVAILABILITY BACKUP BACKUPS BACKWARD BEFORE BEGIN BINARY BUCKET_COUNT BUNDLE BY CACHE CALLED CANCEL CANCELQUERY CAPABILITIES CAPABILITY CASCADE CHANGEFEED CHECK_FILES CLOSE CLUSTER CLUSTERS COLUMNS COMMENT COMMENTS COMMIT COMMITTED COMPACT COMPLETE COMPLETIONS CONFLICT CONFIGURATION CONFIGURATIONS CONFIGURE CONNECTION CONNECTIONS CONSTRAINTS CONTROLCHANGEFEED CONTROLJOB CONVERSION CONVERT COPY COST COVERING CREATEDB CREATELOGIN CREATEROLE CSV CUBE CURRENT CURSOR CYCLE DATA DATABASE DATABASES DAY DEALLOCATE DEBUG_IDS DEBUG_PAUSE_ON DEBUG_DUMP_METADATA_SST DECLARE DELETE DEFAULTS DEFERRED DEFINER DELIMITER DEPENDS DESTINATION DETACHED DETAILS DISCARD DOMAIN DOUBLE DROP ENCODING ENCRYPTED ENCRYPTION_PASSPHRASE ENCRYPTION_INFO_DIR ENUM ENUMS ESCAPE EXCLUDE EXCLUDING EXECUTE EXECUTION EXPERIMENTAL EXPERIMENTAL_AUDIT EXPERIMENTAL_FINGERPRINTS EXPERIMENTAL_RELOCATE EXPERIMENTAL_REPLICA EXPIRATION EXPLAIN EXPORT EXTENSION EXTERNAL EXTREMES FAILURE FILES FILTER FIRST FOLLOWING FORMAT FORCE FORCE_NOT_NULL FORCE_NULL FORCE_QUOTE FORCE_INDEX FORCE_ZIGZAG FORWARD FREEZE FUNCTION FUNCTIONS GENERATED GEOMETRYM GEOMETRYZ GEOMETRYZM GEOMETRYCOLLECTION GEOMETRYCOLLECTIONM GEOMETRYCOLLECTIONZ GEOMETRYCOLLECTIONZM GLOBAL GOAL GRANTEE GRANTS GROUPS HASH HEADER HIGH HISTOGRAM HOLD HOUR IDENTITY IMMEDIATE IMMUTABLE IMPORT INCLUDE INCLUDING INCLUDE_ALL_SECONDARY_TENANTS INCLUDE_ALL_VIRTUAL_CLUSTERS INCREMENT INCREMENTAL INCREMENTAL_LOCATION INDEX INDEXES INHERITS INJECT INPUT INSERT INTO_DB INVERTED INVISIBLE ISOLATION INVOKER JOB JOBS JSON KEY KEYS KMS KV LABEL LANGUAGE LAST LATEST LC_COLLATE LC_CTYPE LEAKPROOF LEASE LESS LEVEL LINESTRING LINESTRINGM LINESTRINGZ LINESTRINGZM LIST LOCAL LOCKED LOGIN LOCALITY LOOKUP LOW MATCH MATERIALIZED MAXVALUE MERGE METHOD MINUTE MINVALUE MODIFYCLUSTERSETTING MODIFYSQLCLUSTERSETTING MULTILINESTRING MULTILINESTRINGM MULTILINESTRINGZ MULTILINESTRINGZM MULTIPOINT MULTIPOINTM MULTIPOINTZ MULTIPOINTZM MULTIPOLYGON MULTIPOLYGONM MULTIPOLYGONZ MULTIPOLYGONZM MONTH MOVE NAMES NAN NEVER NEW_DB_NAME NEW_KMS NEXT NO NORMAL NOTHING NO_INDEX_JOIN NO_ZIGZAG_JOIN NO_FULL_SCAN NOCREATEDB NOCREATELOGIN NOCANCELQUERY NOCREATEROLE NOCONTROLCHANGEFEED NOCONTROLJOB NOLOGIN NOMODIFYCLUSTERSETTING NONVOTERS NOSQLLOGIN NOVIEWACTIVITY NOVIEWACTIVITYREDACTED NOVIEWCLUSTERSETTING NOWAIT NULLS IGNORE_FOREIGN_KEYS INSENSITIVE OF OFF OIDS OLD_KMS OPERATOR OPT OPTION OPTIONS ORDINALITY OTHERS OVER OWNED OWNER PARALLEL PARENT PARTIAL PARTITION PARTITIONS PASSWORD PAUSE PAUSED PHYSICAL PLACEMENT PLAN PLANS POINTM POINTZ POINTZM POLYGONM POLYGONZ POLYGONZM PRECEDING PREPARE PRESERVE PRIOR PRIORITY PRIVILEGES PUBLIC PUBLICATION QUERIES QUERY QUOTE RANGE RANGES READ REASON REASSIGN RECURRING RECURSIVE REDACT REF REFRESH REGION REGIONAL REGIONS REINDEX RELATIVE RELEASE RELOCATE RENAME REPEATABLE REPLACE REPLICATION RESET RESTART RESTORE RESTRICT RESTRICTED RESUME RETENTION RETRY RETURN RETURNS REVISION_HISTORY REVOKE ROLE ROLES ROLLBACK ROLLUP ROUTINES ROWS RULE RUNNING SCHEDULE SCHEDULES SCHEMA_ONLY SCROLL SETTING SETTINGS STATUS SAVEPOINT SCANS SCATTER SCHEMA SCHEMAS SCRUB SEARCH SECOND SECURITY SECONDARY SERIALIZABLE SEQUENCE SEQUENCES SERVER SERVICE SESSION SESSIONS SET SETS SHARE SHARED SHOW SIMPLE SIZE SKIP SKIP_LOCALITIES_CHECK SKIP_MISSING_FOREIGN_KEYS SKIP_MISSING_SEQUENCES SKIP_MISSING_SEQUENCE_OWNERS SKIP_MISSING_VIEWS SKIP_MISSING_UDFS SNAPSHOT SPLIT SQL SQLLOGIN STABLE START STATE STATEMENTS STATISTICS STDIN STDOUT STOP STORAGE STORE STORED STORING STREAM STRICT SUBSCRIPTION SUPER SUPPORT SURVIVE SURVIVAL SYNTAX SYSTEM TABLES TABLESPACE TEMP TEMPLATE TEMPORARY TENANT TENANT_NAME TENANTS TESTING_RELOCATE TEXT TIES TRACE TRACING TRANSACTION TRANSACTIONS TRANSFER TRANSFORM TRIGGER TRUNCATE TRUSTED TYPE TYPES THROTTLING UNBOUNDED UNCOMMITTED UNKNOWN UNLISTEN UNLOGGED UNSAFE_RESTORE_INCOMPATIBLE_VERSION UNSET UNSPLIT UNTIL UPDATE UPSERT USE USERS VALID VALIDATE VALUE VARYING VERIFY_BACKUP_TABLE_DATA VIEW VIEWACTIVITY VIEWACTIVITYREDACTED VIEWCLUSTERMETADATA VIEWCLUSTERSETTING VIEWDEBUG VIRTUAL_CLUSTER_NAME VIRTUAL_CLUSTER VISIBLE VOLATILE VOTERS WITHIN WITHOUT WRITE YEAR ZONE

referenced by:


col_name_keyword:

ANNOTATE_TYPE BETWEEN BIGINT BIT BOOLEAN BOX2D CHAR CHARACTER CHARACTERISTICS COALESCE DEC DECIMAL EXISTS EXTRACT EXTRACT_DURATION FLOAT GEOGRAPHY GEOMETRY GREATEST GROUPING IF IFERROR IFNULL INOUT INT INTEGER INTERVAL ISERROR LEAST NULLIF NUMERIC OUT OVERLAY POINT POLYGON POSITION PRECISION REAL ROW SETOF SMALLINT STRING SUBSTRING TIME TIMETZ TIMESTAMP TIMESTAMPTZ TREAT TRIM VALUES VARBIT VARCHAR VIRTUAL WORK

referenced by:


opt_privileges_clause:

PRIVILEGES

referenced by:


complex_table_pattern:

complex_db_object_name db_object_name_component . unrestricted_name . *

referenced by:


table_pattern_list:

table_pattern ,

referenced by:


table_pattern:

simple_db_object_name complex_table_pattern

referenced by:


function_with_paramtypes_list:

function_with_paramtypes ,

referenced by:


privilege:

name CREATE GRANT SELECT

referenced by:


type_name_list:

type_name ,

referenced by:


type_list:

typename ,

referenced by:


transaction_mode_list:

transaction_mode opt_comma

referenced by:


opt_abort_mod:

TRANSACTION WORK

referenced by:


from_or_in:

FROM IN

referenced by:


next_prior:

NEXT PRIOR

referenced by:


opt_from_or_in:

from_or_in

referenced by:


forward_backward:

FORWARD BACKWARD

referenced by:


opt_forward_backward:

forward_backward

referenced by:


signed_iconst64:

signed_iconst

referenced by:


alter_table_stmt:

alter_onetable_stmt alter_split_stmt alter_unsplit_stmt alter_scatter_stmt alter_zone_table_stmt alter_rename_table_stmt alter_table_set_schema_stmt alter_table_locality_stmt alter_table_owner_stmt

referenced by:


alter_index_stmt:

alter_oneindex_stmt alter_split_index_stmt alter_unsplit_index_stmt alter_scatter_index_stmt alter_rename_index_stmt alter_zone_index_stmt alter_index_visible_stmt

referenced by:


alter_view_stmt:

alter_rename_view_stmt alter_view_set_schema_stmt alter_view_owner_stmt

referenced by:


alter_sequence_stmt:

alter_rename_sequence_stmt alter_sequence_options_stmt alter_sequence_set_schema_stmt alter_sequence_owner_stmt

referenced by:


alter_database_stmt:

alter_rename_database_stmt alter_zone_database_stmt alter_database_owner alter_database_to_schema_stmt alter_database_add_region_stmt alter_database_drop_region_stmt alter_database_survival_goal_stmt alter_database_primary_region_stmt alter_database_placement_stmt alter_database_set_stmt alter_database_add_super_region alter_database_alter_super_region alter_database_drop_super_region alter_database_set_secondary_region_stmt alter_database_drop_secondary_region alter_database_set_zone_config_extension_stmt

referenced by:


alter_range_stmt:

alter_zone_range_stmt alter_range_relocate_stmt

referenced by:


alter_partition_stmt:

alter_zone_partition_stmt

referenced by:


alter_schema_stmt:

ALTER SCHEMA qualifiable_schema_name RENAME TO schema_name OWNER TO role_spec

referenced by:


alter_type_stmt:

ALTER TYPE type_name ADD VALUE IF NOT EXISTS SCONST opt_add_val_placement DROP VALUE SCONST RENAME VALUE SCONST TO SCONST TO name SET SCHEMA schema_name OWNER TO role_spec

referenced by:


alter_default_privileges_stmt:

ALTER DEFAULT PRIVILEGES opt_for_roles FOR ALL ROLES opt_in_schemas abbreviated_grant_stmt abbreviated_revoke_stmt

referenced by:


alter_changefeed_stmt:

ALTER CHANGEFEED a_expr alter_changefeed_cmds

referenced by:


alter_backup_stmt:

ALTER BACKUP string_or_placeholder IN string_or_placeholder alter_backup_cmds

referenced by:


alter_func_stmt:

alter_func_options_stmt alter_func_rename_stmt alter_func_owner_stmt alter_func_set_schema_stmt alter_func_dep_extension_stmt

referenced by:


alter_backup_schedule:

ALTER BACKUP SCHEDULE ICONST alter_backup_schedule_cmds

referenced by:


role_or_group_or_user:

ROLE USER

referenced by:


opt_role_options:

opt_with role_options

referenced by:


opt_in_database:

IN DATABASE database_name

referenced by:


set_or_reset_clause:

SET set_rest RESET_ALL ALL RESET session_var

referenced by:


as_of_clause:

AS OF SYSTEM TIME a_expr

referenced by:


backup_options_list:

backup_options ,

referenced by:


a_expr:

c_expr + - ~ SQRT CBRT qual_op NOT a_expr row OVERLAPS row DEFAULT TYPECAST cast_target TYPEANNOTATE typename COLLATE collation_name AT TIME ZONE a_expr + a_expr - a_expr * a_expr / a_expr FLOORDIV a_expr % a_expr ^ a_expr # a_expr & a_expr | a_expr < a_expr > a_expr ? a_expr JSON_SOME_EXISTS a_expr JSON_ALL_EXISTS a_expr CONTAINS a_expr CONTAINED_BY a_expr = a_expr CONCAT a_expr LSHIFT a_expr RSHIFT a_expr FETCHVAL a_expr FETCHTEXT a_expr FETCHVAL_PATH a_expr FETCHTEXT_PATH a_expr REMOVE_PATH a_expr INET_CONTAINED_BY_OR_EQUALS a_expr AND_AND a_expr AT_AT a_expr