SQL Grammar

On this page Carat arrow pointing down
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 preparable_stmt copy_from_stmt comment_stmt execute_stmt deallocate_stmt discard_stmt grant_stmt prepare_stmt revoke_stmt savepoint_stmt release_stmt nonpreparable_set_stmt transaction_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:


copy_from_stmt:

COPY table_name opt_column_list FROM STDIN opt_with_options

referenced by:


comment_stmt:

COMMENT ON DATABASE database_name TABLE 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

referenced by:


grant_stmt:

GRANT privileges ON targets TO name_list privilege_list TO name_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 targets ADMIN OPTION FOR privilege_list FROM name_list

referenced by:


savepoint_stmt:

SAVEPOINT name

referenced by:


release_stmt:

RELEASE savepoint_name

referenced by:


nonpreparable_set_stmt:

set_transaction_stmt

referenced by:


transaction_stmt:

begin_stmt commit_stmt rollback_stmt abort_stmt

referenced by:


alter_stmt:

alter_ddl_stmt alter_role_stmt

referenced by:


backup_stmt:

BACKUP targets TO partitioned_backup opt_as_of_clause opt_incremental opt_with_options

referenced by:


cancel_stmt:

cancel_jobs_stmt cancel_queries_stmt cancel_sessions_stmt

referenced by:


create_stmt:

create_role_stmt create_ddl_stmt create_stats_stmt

referenced by:


delete_stmt:

opt_with_clause DELETE FROM table_expr_opt_alias_idx opt_where_clause opt_sort_clause opt_limit_clause returning_clause

referenced by:


drop_stmt:

drop_ddl_stmt drop_role_stmt

referenced by:


explain_stmt:

EXPLAIN ANALYZE ANALYSE ( explain_option_list ) preparable_stmt

referenced by:


import_stmt:

IMPORT import_format string_or_placeholder TABLE table_name FROM import_format string_or_placeholder CREATE USING string_or_placeholder ( table_elem_list ) import_format DATA ( string_or_placeholder_list ) 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 JOB a_expr JOBS select_stmt

referenced by:


reset_stmt:

reset_session_stmt reset_csetting_stmt

referenced by:


restore_stmt:

RESTORE targets FROM partitioned_backup_list opt_as_of_clause opt_with_options

referenced by:


resume_stmt:

RESUME JOB a_expr JOBS select_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_csetting_stmt use_stmt

referenced by:


show_stmt:

show_backup_stmt show_columns_stmt show_constraints_stmt show_create_stmt show_csettings_stmt show_databases_stmt show_grants_stmt show_indexes_stmt show_partitions_stmt show_jobs_stmt show_queries_stmt show_ranges_stmt show_range_for_row_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_users_stmt show_zone_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:


table_name:

db_object_name

referenced by:


opt_column_list:

( name_list )

referenced by:


opt_with_options:

WITH kv_option_list OPTIONS ( kv_option_list )

referenced by:


database_name:

name

referenced by:


comment_text:

SCONST NULL

referenced by:


column_path:

name prefixed_column_path

referenced by:


table_index_name:

table_name @ index_name standalone_index_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 privilege_list

referenced by:


targets:

identifier col_name_keyword unreserved_keyword complex_table_pattern table_pattern , TABLE table_pattern_list DATABASE name_list

referenced by:


name_list:

name ,

referenced by:


privilege_list:

privilege ,

referenced by:


prep_type_clause:

( type_list )

referenced by:


savepoint_name:

SAVEPOINT name

referenced by:


set_transaction_stmt:

SET SESSION TRANSACTION transaction_mode_list

referenced by:


begin_stmt:

BEGIN opt_transaction START TRANSACTION begin_transaction

referenced by:


commit_stmt:

COMMIT END opt_transaction

referenced by:


rollback_stmt:

ROLLBACK opt_transaction TO savepoint_name

referenced by:


abort_stmt:

ABORT opt_abort_mod

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

referenced by:


alter_role_stmt:

ALTER role_or_group_or_user IF EXISTS string_or_placeholder opt_role_options

referenced by:


partitioned_backup:

string_or_placeholder ( string_or_placeholder_list )

referenced by:


opt_as_of_clause:

as_of_clause

referenced by:


opt_incremental:

INCREMENTAL FROM string_or_placeholder_list

referenced by:


cancel_jobs_stmt:

CANCEL JOB a_expr JOBS select_stmt

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:


create_role_stmt:

CREATE role_or_group_or_user IF NOT EXISTS string_or_placeholder opt_role_options

referenced by:


create_ddl_stmt:

create_changefeed_stmt create_database_stmt create_index_stmt create_schema_stmt create_table_stmt create_table_as_stmt create_view_stmt create_sequence_stmt

referenced by:


create_stats_stmt:

CREATE STATISTICS statistics_name opt_stats_columns FROM create_stats_target opt_create_stats_options

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_where_clause:

where_clause

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

referenced by:


drop_role_stmt:

DROP role_or_group_or_user IF EXISTS string_or_placeholder_list

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:


string_or_placeholder_list:

string_or_placeholder ,

referenced by:


table_elem_list:

table_elem ,

referenced by:


insert_column_list:

insert_column_item ,

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 opt_conf_expr DO UPDATE SET set_clause_list opt_where_clause NOTHING

referenced by:


a_expr:

c_expr + - ~ NOT a_expr 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 INET_CONTAINS_OR_EQUALS a_expr LESS_EQUALS a_expr GREATER_EQUALS a_expr NOT_EQUALS a_expr AND a_expr OR a_expr LIKE a_expr LIKE a_expr ESCAPE a_expr NOT LIKE a_expr NOT LIKE a_expr ESCAPE a_expr ILIKE a_expr ILIKE a_expr ESCAPE a_expr NOT ILIKE a_expr NOT ILIKE a_expr ESCAPE a_expr SIMILAR TO a_expr SIMILAR TO a_expr ESCAPE a_expr NOT SIMILAR TO a_expr NOT SIMILAR TO a_expr ESCAPE a_expr ~ a_expr NOT_REGMATCH a_expr REGIMATCH a_expr NOT_REGIMATCH a_expr IS NAN IS NOT NAN IS NULL ISNULL IS NOT NULL NOTNULL IS TRUE IS NOT TRUE IS FALSE IS NOT FALSE IS UNKNOWN IS NOT UNKNOWN IS DISTINCT FROM a_expr IS NOT DISTINCT FROM a_expr IS OF ( type_list ) IS NOT OF ( type_list ) BETWEEN opt_asymmetric b_expr AND a_expr NOT BETWEEN opt_asymmetric b_expr AND a_expr BETWEEN SYMMETRIC b_expr AND a_expr NOT BETWEEN SYMMETRIC b_expr AND a_expr IN in_expr NOT IN in_expr subquery_op sub_type a_expr

referenced by:


reset_session_stmt:

RESET SESSION session_var

referenced by:


reset_csetting_stmt:

RESET CLUSTER SETTING var_name

referenced by:


partitioned_backup_list:

partitioned_backup ,

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_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 BACKUP SCHEMAS string_or_placeholder opt_with_options

referenced by:


show_columns_stmt:

SHOW COLUMNS FROM table_name with_comment

referenced by:


show_constraints_stmt:

SHOW CONSTRAINT CONSTRAINTS FROM table_name

referenced by:


show_create_stmt:

SHOW CREATE table_name

referenced by:


show_csettings_stmt:

SHOW CLUSTER SETTING var_name ALL SETTINGS ALL PUBLIC CLUSTER SETTINGS

referenced by:


show_databases_stmt:

SHOW DATABASES with_comment

referenced by:


show_grants_stmt:

SHOW GRANTS opt_on_targets_roles 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 JOB WHEN COMPLETE a_expr

referenced by:


show_queries_stmt:

SHOW ALL opt_cluster QUERIES

referenced by:


show_ranges_stmt:

SHOW RANGES FROM TABLE table_name INDEX table_index_name DATABASE database_name

referenced by:


show_range_for_row_stmt:

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

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

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_users_stmt:

SHOW USERS

referenced by:


show_zone_stmt:

SHOW ZONE CONFIGURATION FOR 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:


opt_table:

TABLE

referenced by:


relation_expr_list:

relation_expr ,

referenced by:


opt_drop_behavior:

CASCADE RESTRICT

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:


kv_option_list:

kv_option ,

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 ACTION ADD ADMIN AGGREGATE ALTER AT AUTOMATIC AUTHORIZATION BACKUP BEGIN BIGSERIAL BLOB BOOL BUCKET_COUNT BUNDLE BY BYTEA BYTES CACHE CANCEL CASCADE CHANGEFEED CLUSTER COLUMNS COMMENT COMMIT COMMITTED COMPACT COMPLETE CONFLICT CONFIGURATION CONFIGURATIONS CONFIGURE CONSTRAINTS CONVERSION COPY COVERING CREATEROLE CUBE CURRENT CYCLE DATA DATABASE DATABASES DATE DAY DEALLOCATE DELETE DEFERRED DISCARD DOMAIN DOUBLE DROP ENCODING ENUM ESCAPE EXCLUDE EXECUTE EXPERIMENTAL EXPERIMENTAL_AUDIT EXPERIMENTAL_FINGERPRINTS EXPERIMENTAL_RELOCATE EXPERIMENTAL_REPLICA EXPIRATION EXPLAIN EXPORT EXTENSION FILES FILTER FIRST FLOAT4 FLOAT8 FOLLOWING FORCE_INDEX FUNCTION GLOBAL GRANTS GROUPS HASH HIGH HISTOGRAM HOUR IMMEDIATE IMPORT INCLUDE INCREMENT INCREMENTAL INDEXES INET INJECT INSERT INT2 INT2VECTOR INT4 INT8 INT64 INTERLEAVE INVERTED ISOLATION JOB JOBS JSON JSONB KEY KEYS KV LANGUAGE LAST LC_COLLATE LC_CTYPE LEASE LESS LEVEL LIST LOCAL LOCKED LOGIN LOOKUP LOW MATCH MATERIALIZED MAXVALUE MERGE MINUTE MINVALUE MONTH NAMES NAN NAME NEXT NO NORMAL NO_INDEX_JOIN NOCREATEROLE NOLOGIN NOWAIT NULLS IGNORE_FOREIGN_KEYS OF OFF OID OIDS OIDVECTOR OPERATOR OPT OPTION OPTIONS ORDINALITY OTHERS OVER OWNED PARENT PARTIAL PARTITION PARTITIONS PASSWORD PAUSE PHYSICAL PLAN PLANS PRECEDING PREPARE PRESERVE PRIORITY PUBLIC PUBLICATION QUERIES QUERY RANGE RANGES READ RECURSIVE REF REGCLASS REGPROC REGPROCEDURE REGNAMESPACE REGTYPE REINDEX RELEASE RENAME REPEATABLE REPLACE RESET RESTORE RESTRICT RESUME REVOKE ROLE ROLES ROLLBACK ROLLUP ROWS RULE SETTING SETTINGS STATUS SAVEPOINT SCATTER SCHEMA SCHEMAS SCRUB SEARCH SECOND SERIAL SERIALIZABLE SERIAL2 SERIAL4 SERIAL8 SEQUENCE SEQUENCES SERVER SESSION SESSIONS SET SHARE SHOW SIMPLE SKIP SMALLSERIAL SNAPSHOT SPLIT SQL START STATISTICS STDIN STORE STORED STORING STRICT STRING SUBSCRIPTION SYNTAX SYSTEM TABLES TEMP TEMPLATE TEMPORARY TESTING_RELOCATE TEXT TIES TRACE TRANSACTION TRIGGER TRUNCATE TRUSTED TYPE THROTTLING UNBOUNDED UNCOMMITTED UNKNOWN UNLOGGED UNSPLIT UNTIL UPDATE UPSERT UUID USE USERS VALID VALIDATE VALUE VARYING VIEW WITHIN WITHOUT WRITE YEAR ZONE

referenced by:


col_name_keyword:

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

referenced by:


complex_table_pattern:

complex_db_object_name db_object_name_component . unrestricted_name . *

referenced by:


table_pattern:

simple_db_object_name complex_table_pattern

referenced by:


table_pattern_list:

table_pattern ,

referenced by:


privilege:

name CREATE GRANT SELECT

referenced by:


type_list:

typename ,

referenced by:


transaction_mode_list:

transaction_mode opt_comma

referenced by:


opt_transaction:

TRANSACTION

referenced by:


begin_transaction:

transaction_mode_list

referenced by:


opt_abort_mod:

TRANSACTION WORK

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

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

referenced by:


alter_view_stmt:

alter_rename_view_stmt

referenced by:


alter_sequence_stmt:

alter_rename_sequence_stmt alter_sequence_options_stmt

referenced by:


alter_database_stmt:

alter_rename_database_stmt alter_zone_database_stmt

referenced by:


alter_range_stmt:

alter_zone_range_stmt

referenced by:


alter_partition_stmt:

alter_zone_partition_stmt

referenced by:


role_or_group_or_user:

ROLE USER

referenced by:


opt_role_options:

opt_with role_options

referenced by:


as_of_clause:

AS OF SYSTEM TIME a_expr

referenced by:


create_changefeed_stmt:

CREATE CHANGEFEED FOR changefeed_targets opt_changefeed_sink opt_with_options

referenced by:


create_database_stmt:

CREATE DATABASE IF NOT EXISTS database_name opt_with opt_template_clause opt_encoding_clause opt_lc_collate_clause opt_lc_ctype_clause

referenced by:


create_index_stmt:

CREATE opt_unique INDEX opt_concurrently opt_index_name IF NOT EXISTS index_name ON table_name opt_using_gin_btree ( index_params ) opt_hash_sharded INVERTED INDEX opt_concurrently opt_index_name IF NOT EXISTS index_name ON table_name ( index_params ) opt_storing opt_interleave opt_partition_by

referenced by:


create_schema_stmt:

CREATE SCHEMA IF NOT EXISTS schema_name

referenced by:


create_table_stmt:

CREATE opt_temp_create_table TABLE IF NOT EXISTS table_name ( opt_table_elem_list ) opt_interleave opt_partition_by

referenced by:


create_table_as_stmt:

CREATE opt_temp_create_table TABLE IF NOT EXISTS table_name create_as_opt_col_list AS select_stmt

referenced by:


create_view_stmt:

CREATE opt_temp VIEW IF NOT EXISTS view_name opt_column_list AS select_stmt

referenced by:


create_sequence_stmt:

CREATE opt_temp SEQUENCE IF NOT EXISTS sequence_name opt_sequence_option_list

referenced by:


statistics_name:

name

referenced by:


opt_stats_columns:

ON name_list

referenced by:


create_stats_target:

table_name

referenced by:


opt_create_stats_options:

as_of_clause

referenced by:


with_clause:

WITH RECURSIVE cte_list

referenced by:


table_name_opt_idx:

table_name opt_index_flags

referenced by:


where_clause:

WHERE a_expr

referenced by:


sort_clause:

ORDER BY sortby_list

referenced by:


limit_clause:

LIMIT ALL a_expr FETCH first_or_next select_fetch_first_value row_or_rows ONLY

referenced by:


target_list:

target_elem ,

referenced by:


drop_database_stmt:

DROP DATABASE IF EXISTS database_name opt_drop_behavior

referenced by:


drop_index_stmt:

DROP INDEX opt_concurrently IF EXISTS table_index_name_list opt_drop_behavior

referenced by:


drop_table_stmt:

DROP TABLE IF EXISTS table_name_list opt_drop_behavior

referenced by:


drop_view_stmt:

DROP VIEW IF EXISTS table_name_list opt_drop_behavior

referenced by:


drop_sequence_stmt:

DROP SEQUENCE IF EXISTS table_name_list opt_drop_behavior

referenced by:


explain_option_name:

non_reserved_word

referenced by:


non_reserved_word_or_sconst:

non_reserved_word SCONST

referenced by:


table_elem:

column_def index_def family_def table_constraint

referenced by:


insert_column_item:

column_name

referenced by:


opt_conf_expr:

( name_list )

referenced by:


c_expr:

d_expr array_subscripts case_expr EXISTS select_with_parens

referenced by:


cast_target:

typename

referenced by:


typename:

simple_typename opt_array_bounds ARRAY

referenced by:


collation_name:

unrestricted_name

referenced by:


opt_asymmetric:

ASYMMETRIC

referenced by:


b_expr:

c_expr + - ~ b_expr TYPECAST cast_target TYPEANNOTATE typename + - * / FLOORDIV % ^ # & | < > = CONCAT LSHIFT RSHIFT LESS_EQUALS GREATER_EQUALS NOT_EQUALS b_expr IS NOT DISTINCT FROM b_expr OF ( type_list )

referenced by:


in_expr:

select_with_parens expr_tuple1_ambiguous

referenced by:


subquery_op:

math_op NOT LIKE ILIKE

referenced by:


sub_type:

ANY SOME ALL

referenced by:


session_var:

identifier ALL DATABASE NAMES SESSION_USER TIME ZONE

referenced by:


var_name:

name attrs

referenced by:


opt_scrub_options_clause:

WITH OPTIONS scrub_option_list

referenced by:


simple_select:

simple_select_clause values_clause table_clause set_operation

referenced by:


select_clause:

simple_select select_with_parens

referenced by:


for_locking_clause:

for_locking_items FOR READ ONLY

referenced by:


opt_select_limit:

select_limit

referenced by:


select_limit:

limit_clause offset_clause offset_clause limit_clause

referenced by:


opt_for_locking_clause:

for_locking_clause

referenced by:


set_rest_more:

generic_set

referenced by:


to_or_eq:

= TO

referenced by:


var_value:

a_expr extra_var_value

referenced by:


with_comment:

WITH COMMENT

referenced by:


opt_on_targets_roles:

ON targets_roles

referenced by:


for_grantee_clause:

FOR name_list

referenced by:


opt_cluster:

CLUSTER LOCAL

referenced by:


opt_compact:

COMPACT

referenced by:


zone_name:

unrestricted_name

referenced by:


opt_partition:

partition

referenced by:


partition_name:

unrestricted_name

referenced by:


relation_expr:

table_name * ONLY table_name ( table_name )

referenced by:


set_clause:

single_set_clause multiple_set_clause

referenced by:


from_list:

table_ref ,

referenced by:


simple_db_object_name:

db_object_name_component

referenced by:


complex_db_object_name:

db_object_name_component . unrestricted_name . unrestricted_name

referenced by:


kv_option:

name SCONST = string_or_placeholder

referenced by:


db_object_name_component:

name FAMILY cockroachdb_extra_reserved_keyword

referenced by:


unrestricted_name:

identifier unreserved_keyword col_name_keyword type_func_name_keyword reserved_keyword

referenced by:


transaction_mode:

transaction_user_priority transaction_read_mode as_of_clause

referenced by:


opt_comma:

,

referenced by:


alter_onetable_stmt:

ALTER TABLE IF EXISTS relation_expr alter_table_cmds

referenced by:


alter_split_stmt:

ALTER TABLE table_name SPLIT AT select_stmt WITH EXPIRATION a_expr

referenced by:


alter_unsplit_stmt:

ALTER TABLE table_name UNSPLIT AT select_stmt ALL

referenced by:


alter_scatter_stmt:

ALTER TABLE table_name SCATTER FROM ( expr_list ) TO ( expr_list )

referenced by:


alter_zone_table_stmt:

ALTER TABLE table_name set_zone_config

referenced by:


alter_rename_table_stmt:

ALTER TABLE IF EXISTS relation_expr RENAME TO table_name

referenced by:


alter_oneindex_stmt:

ALTER INDEX IF EXISTS table_index_name alter_index_cmds

referenced by:


alter_split_index_stmt:

ALTER INDEX table_index_name SPLIT AT select_stmt WITH EXPIRATION a_expr

referenced by:


alter_unsplit_index_stmt:

ALTER INDEX table_index_name UNSPLIT AT select_stmt ALL

referenced by:


alter_scatter_index_stmt:

ALTER INDEX table_index_name SCATTER FROM ( expr_list ) TO ( expr_list )

referenced by:


alter_rename_index_stmt:

ALTER INDEX IF EXISTS table_index_name RENAME TO index_name

referenced by:


alter_zone_index_stmt:

ALTER INDEX table_index_name set_zone_config

referenced by:


alter_rename_view_stmt:

ALTER VIEW IF EXISTS relation_expr RENAME TO view_name

referenced by:


alter_rename_sequence_stmt:

ALTER SEQUENCE IF EXISTS relation_expr RENAME TO sequence_name

referenced by:


alter_sequence_options_stmt:

ALTER SEQUENCE IF EXISTS sequence_name sequence_option_list

referenced by:


alter_rename_database_stmt:

ALTER DATABASE database_name RENAME TO database_name

referenced by:


alter_zone_database_stmt:

ALTER DATABASE database_name set_zone_config

referenced by:


alter_zone_range_stmt:

ALTER RANGE zone_name set_zone_config

referenced by:


alter_zone_partition_stmt:

ALTER PARTITION partition_name OF TABLE table_name INDEX table_index_name table_name @ * set_zone_config

referenced by:


opt_with:

WITH

referenced by:


role_options:

role_option

referenced by:


changefeed_targets:

TABLE single_table_pattern_list

referenced by:


opt_changefeed_sink:

INTO string_or_placeholder

referenced by:


opt_template_clause:

TEMPLATE opt_equal non_reserved_word_or_sconst

referenced by:


opt_encoding_clause:

ENCODING opt_equal non_reserved_word_or_sconst

referenced by:


opt_lc_collate_clause:

LC_COLLATE opt_equal non_reserved_word_or_sconst

referenced by:


opt_lc_ctype_clause:

LC_CTYPE opt_equal non_reserved_word_or_sconst

referenced by:


opt_unique:

UNIQUE

referenced by:


opt_concurrently:

CONCURRENTLY

referenced by:


opt_index_name:

opt_name

referenced by:


opt_using_gin_btree:

USING name

referenced by:


index_params:

index_elem ,

referenced by:


opt_hash_sharded:

USING HASH WITH BUCKET_COUNT = a_expr

referenced by:


opt_storing:

storing ( name_list )

referenced by:


opt_interleave:

INTERLEAVE IN PARENT table_name ( name_list )

referenced by:


opt_partition_by:

partition_by

referenced by:


schema_name:

name

referenced by:


opt_temp_create_table:

opt_temp LOCAL GLOBAL TEMPORARY TEMP

referenced by:


opt_table_elem_list:

table_elem_list

referenced by:


create_as_opt_col_list:

( create_as_table_defs )

referenced by:


opt_temp:

TEMPORARY TEMP

referenced by:


view_name:

table_name

referenced by:


sequence_name:

db_object_name

referenced by:


opt_sequence_option_list:

sequence_option_list

referenced by:


cte_list:

common_table_expr ,

referenced by:


opt_index_flags:

@ index_name [ ICONST ] { index_flags_param_list }

referenced by:


sortby_list:

sortby ,

referenced by:


first_or_next:

FIRST NEXT

referenced by:


select_fetch_first_value:

c_expr only_signed_iconst only_signed_fconst

referenced by:


row_or_rows:

ROW ROWS

referenced by:


target_elem:

a_expr AS target_name identifier *

referenced by:


table_index_name_list:

table_index_name ,

referenced by:


table_name_list:

table_name ,

referenced by:


non_reserved_word:

identifier unreserved_keyword col_name_keyword type_func_name_keyword

referenced by:


column_def:

column_name typename col_qual_list

referenced by:


index_def:

UNIQUE INDEX opt_index_name ( index_params ) opt_hash_sharded opt_storing opt_interleave opt_partition_by INVERTED INDEX opt_name ( index_params )

referenced by:


family_def:

FAMILY opt_family_name ( name_list )

referenced by:


table_constraint:

CONSTRAINT constraint_name constraint_elem

referenced by:


column_name:

name

referenced by:


d_expr:

@ ICONST FCONST const_typename SCONST BCONST BITCONST interval_value TRUE FALSE NULL column_path_with_star PLACEHOLDER ( a_expr ) . * unrestricted_name @ ICONST func_expr select_with_parens labeled_row ARRAY select_with_parens row array_expr

referenced by:


array_subscripts:

array_subscript

referenced by:


case_expr:

CASE case_arg when_clause_list case_default END

referenced by:


simple_typename:

const_typename bit_with_length character_with_length interval_type postgres_oid

referenced by:


opt_array_bounds: