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

no references

stmt:

referenced by:

- stmt_block

preparable_stmt:

referenced by:

- common_table_expr
- explain_stmt
- prepare_stmt
- stmt

copy_from_stmt:

referenced by:

- stmt

comment_stmt:

referenced by:

- stmt

execute_stmt:

referenced by:

- stmt

deallocate_stmt:

referenced by:

- stmt

discard_stmt:

referenced by:

- stmt

grant_stmt:

referenced by:

- stmt

prepare_stmt:

referenced by:

- stmt

revoke_stmt:

referenced by:

- stmt

savepoint_stmt:

referenced by:

- stmt

release_stmt:

referenced by:

- stmt

nonpreparable_set_stmt:

referenced by:

- stmt

transaction_stmt:

referenced by:

- stmt

alter_stmt:

referenced by:

- preparable_stmt

backup_stmt:

referenced by:

- preparable_stmt

cancel_stmt:

referenced by:

- preparable_stmt

create_stmt:

referenced by:

- preparable_stmt

delete_stmt:

referenced by:

- preparable_stmt
- row_source_extension_stmt

drop_stmt:

referenced by:

- preparable_stmt

explain_stmt:

referenced by:

- preparable_stmt
- row_source_extension_stmt

import_stmt:

referenced by:

- preparable_stmt

insert_stmt:

referenced by:

- preparable_stmt
- row_source_extension_stmt

pause_stmt:

referenced by:

- preparable_stmt

reset_stmt:

referenced by:

- preparable_stmt

restore_stmt:

referenced by:

- preparable_stmt

resume_stmt:

referenced by:

- preparable_stmt

export_stmt:

referenced by:

- preparable_stmt

scrub_stmt:

referenced by:

- preparable_stmt

select_stmt:

referenced by:

- alter_split_index_stmt
- alter_split_stmt
- alter_unsplit_index_stmt
- alter_unsplit_stmt
- cancel_jobs_stmt
- cancel_queries_stmt
- cancel_sessions_stmt
- create_table_as_stmt
- create_view_stmt
- export_stmt
- insert_rest
- pause_stmt
- preparable_stmt
- resume_stmt
- row_source_extension_stmt
- show_jobs_stmt

preparable_set_stmt:

referenced by:

- preparable_stmt

show_stmt:

referenced by:

- preparable_stmt
- row_source_extension_stmt

truncate_stmt:

referenced by:

- preparable_stmt

update_stmt:

referenced by:

- preparable_stmt
- row_source_extension_stmt

upsert_stmt:

referenced by:

- preparable_stmt
- row_source_extension_stmt

table_name:

referenced by:

- alter_rename_table_stmt
- alter_scatter_stmt
- alter_split_stmt
- alter_unsplit_stmt
- alter_zone_partition_stmt
- alter_zone_table_stmt
- col_qualification_elem
- comment_stmt
- constraint_elem
- copy_from_stmt
- create_index_stmt
- create_stats_target
- create_table_as_stmt
- create_table_stmt
- import_stmt
- insert_target
- opt_interleave
- relation_expr
- scrub_table_stmt
- show_columns_stmt
- show_constraints_stmt
- show_create_stmt
- show_indexes_stmt
- show_partitions_stmt
- show_range_for_row_stmt
- show_ranges_stmt
- show_stats_stmt
- show_zone_stmt
- single_table_pattern_list
- sortby
- table_index_name
- table_name_list
- table_name_opt_idx
- view_name

opt_column_list:

referenced by:

- alias_clause
- common_table_expr
- constraint_elem
- copy_from_stmt
- create_view_stmt

opt_with_options:

referenced by:

- backup_stmt
- copy_from_stmt
- create_changefeed_stmt
- export_stmt
- import_stmt
- restore_stmt
- show_backup_stmt

database_name:

referenced by:

- alter_rename_database_stmt
- alter_zone_database_stmt
- comment_stmt
- create_database_stmt
- drop_database_stmt
- scrub_database_stmt
- show_indexes_stmt
- show_partitions_stmt
- show_ranges_stmt
- show_zone_stmt

comment_text:

referenced by:

- comment_stmt

column_path:

referenced by:

- column_path_with_star
- comment_stmt
- sequence_option_elem

table_index_name:

referenced by:

- alter_oneindex_stmt
- alter_rename_index_stmt
- alter_scatter_index_stmt
- alter_split_index_stmt
- alter_unsplit_index_stmt
- alter_zone_index_stmt
- alter_zone_partition_stmt
- comment_stmt
- show_partitions_stmt
- show_range_for_row_stmt
- show_ranges_stmt
- show_zone_stmt
- table_index_name_list

table_alias_name:

referenced by:

- alias_clause
- common_table_expr
- execute_stmt
- insert_target
- prepare_stmt
- table_expr_opt_alias_idx

execute_param_clause:

referenced by:

- execute_stmt

name:

referenced by:

- column_name
- column_path
- constraint_name
- database_name
- db_object_name_component
- deallocate_stmt
- family_name
- import_format
- kv_option
- name_list
- opt_existing_window_name
- opt_name
- opt_name_parens
- opt_using_gin_btree
- privilege
- savepoint_name
- savepoint_stmt
- schema_name
- show_schemas_stmt
- show_sequences_stmt
- show_tables_stmt
- statistics_name
- table_alias_name
- var_name
- window_name

privileges:

referenced by:

- grant_stmt
- revoke_stmt

targets:

referenced by:

- backup_stmt
- grant_stmt
- restore_stmt
- revoke_stmt
- targets_roles

name_list:

referenced by:

- constraint_elem
- family_def
- for_grantee_clause
- grant_stmt
- join_qual
- labeled_row
- opt_column_list
- opt_conf_expr
- opt_interleave
- opt_stats_columns
- opt_storing
- partition_by
- revoke_stmt
- scrub_option
- targets
- targets_roles

privilege_list:

referenced by:

- grant_stmt
- privileges
- revoke_stmt

prep_type_clause:

referenced by:

- prepare_stmt

savepoint_name:

referenced by:

- release_stmt
- rollback_stmt

set_transaction_stmt:

referenced by:

- nonpreparable_set_stmt

begin_stmt:

referenced by:

- transaction_stmt

commit_stmt:

referenced by:

- transaction_stmt

rollback_stmt:

referenced by:

- transaction_stmt

abort_stmt:

referenced by:

- transaction_stmt

alter_ddl_stmt:

referenced by:

- alter_stmt

alter_role_stmt:

referenced by:

- alter_stmt

partitioned_backup:

referenced by:

- backup_stmt
- partitioned_backup_list

opt_as_of_clause:

referenced by:

- backup_stmt
- from_clause
- restore_stmt
- scrub_database_stmt
- scrub_table_stmt

opt_incremental:

referenced by:

- backup_stmt

cancel_jobs_stmt:

referenced by:

- cancel_stmt

cancel_queries_stmt:

referenced by:

- cancel_stmt

cancel_sessions_stmt:

referenced by:

- cancel_stmt

create_role_stmt:

referenced by:

- create_stmt

create_ddl_stmt:

referenced by:

- create_stmt

create_stats_stmt:

referenced by:

- create_stmt

opt_with_clause:

referenced by:

- delete_stmt
- insert_stmt
- update_stmt
- upsert_stmt

table_expr_opt_alias_idx:

referenced by:

- delete_stmt
- update_stmt

opt_where_clause:

referenced by:

- delete_stmt
- on_conflict
- simple_select_clause
- update_stmt

opt_sort_clause:

referenced by:

- delete_stmt
- func_application
- select_no_parens
- update_stmt
- window_specification

opt_limit_clause:

referenced by:

- delete_stmt
- update_stmt

returning_clause:

referenced by:

- delete_stmt
- insert_stmt
- update_stmt
- upsert_stmt

drop_ddl_stmt:

referenced by:

- drop_stmt

drop_role_stmt:

referenced by:

- drop_stmt

explain_option_list:

referenced by:

- explain_stmt

import_format:

referenced by:

- export_stmt
- import_stmt

string_or_placeholder:

referenced by:

- alter_role_stmt
- create_role_stmt
- export_stmt
- import_stmt
- kv_option
- opt_changefeed_sink
- partitioned_backup
- password_clause
- show_backup_stmt
- string_or_placeholder_list
- valid_until_clause

string_or_placeholder_list:

referenced by:

- drop_role_stmt
- import_stmt
- opt_incremental
- partitioned_backup

table_elem_list:

referenced by:

- import_stmt
- opt_table_elem_list

insert_column_list:

referenced by:

- import_stmt
- insert_rest
- multiple_set_clause

insert_target:

referenced by:

- insert_stmt
- upsert_stmt

insert_rest:

referenced by:

- insert_stmt
- upsert_stmt

on_conflict:

referenced by:

- insert_stmt

a_expr:

referenced by:

- a_expr
- alter_column_default
- alter_split_index_stmt
- alter_split_stmt
- array_subscript
- as_of_clause
- cancel_jobs_stmt
- cancel_queries_stmt
- cancel_sessions_stmt
- case_arg
- case_default
- col_qualification_elem
- constraint_elem
- d_expr
- expr_list
- extract_list
- filter_clause
- frame_bound
- func_expr_common_subexpr
- having_clause
- index_elem
- join_qual
- limit_clause
- offset_clause
- opt_alter_column_using
- opt_hash_sharded
- opt_slice_bound
- overlay_list
- overlay_placing
- pause_stmt
- resume_stmt
- show_jobs_stmt
- single_set_clause
- sortby
- special_function
- substr_for
- substr_from
- substr_list
- target_elem
- trim_list
- tuple1_ambiguous_values
- tuple1_unambiguous_values
- var_value
- when_clause
- where_clause

reset_session_stmt:

referenced by:

- reset_stmt

reset_csetting_stmt:

referenced by:

- reset_stmt

partitioned_backup_list:

referenced by:

- restore_stmt

scrub_table_stmt:

referenced by:

- scrub_stmt

scrub_database_stmt:

referenced by:

- scrub_stmt

select_no_parens:

referenced by:

- select_stmt
- select_with_parens

select_with_parens:

referenced by:

- c_expr
- d_expr
- in_expr
- select_clause
- select_stmt
- select_with_parens
- table_ref

set_session_stmt:

referenced by:

- preparable_set_stmt

set_csetting_stmt:

referenced by:

- preparable_set_stmt

use_stmt:

referenced by:

- preparable_set_stmt

show_backup_stmt:

referenced by:

- show_stmt

show_columns_stmt:

referenced by:

- show_stmt

show_constraints_stmt:

referenced by:

- show_stmt

show_create_stmt:

referenced by:

- show_stmt

show_csettings_stmt:

referenced by:

- show_stmt

show_databases_stmt:

referenced by:

- show_stmt

show_grants_stmt:

referenced by:

- show_stmt

show_indexes_stmt:

referenced by:

- show_stmt

show_partitions_stmt:

referenced by:

- show_stmt

show_jobs_stmt:

referenced by:

- show_stmt

show_queries_stmt:

referenced by:

- show_stmt

show_ranges_stmt:

referenced by:

- show_stmt

show_range_for_row_stmt:

referenced by:

- show_stmt

show_roles_stmt:

referenced by:

- show_stmt

show_savepoint_stmt:

referenced by:

- show_stmt

show_schemas_stmt:

referenced by:

- show_stmt

show_sequences_stmt:

referenced by:

- show_stmt

show_session_stmt:

referenced by:

- show_stmt

show_sessions_stmt:

referenced by:

- show_stmt

show_stats_stmt:

referenced by:

- show_stmt

show_tables_stmt:

referenced by:

- show_stmt

show_trace_stmt:

referenced by:

- show_stmt

show_users_stmt:

referenced by:

- show_stmt

show_zone_stmt:

referenced by:

- show_stmt

opt_table:

referenced by:

- truncate_stmt

relation_expr_list:

referenced by:

- truncate_stmt

opt_drop_behavior:

referenced by:

- alter_table_cmd
- drop_database_stmt
- drop_index_stmt
- drop_sequence_stmt
- drop_table_stmt
- drop_view_stmt
- truncate_stmt

set_clause_list:

referenced by:

- on_conflict
- update_stmt

opt_from_list:

referenced by:

- update_stmt

db_object_name:

referenced by:

- sequence_name
- standalone_index_name
- table_name

kv_option_list:

referenced by:

- opt_with_options

prefixed_column_path:

referenced by:

- column_path
- func_name

index_name:

referenced by:

- alter_rename_index_stmt
- create_index_stmt
- index_flags_param
- opt_index_flags
- sortby
- table_index_name

standalone_index_name:

referenced by:

- table_index_name

expr_list:

referenced by:

- alter_scatter_index_stmt
- alter_scatter_stmt
- distinct_on_clause
- execute_param_clause
- extract_list
- func_application
- func_expr_common_subexpr
- group_clause
- list_partition
- opt_expr_list
- opt_partition_clause
- overlay_list
- range_partition
- show_range_for_row_stmt
- special_function
- trim_list
- tuple1_ambiguous_values
- tuple1_unambiguous_values
- values_clause

unreserved_keyword:

referenced by:

- name
- non_reserved_word
- targets
- type_function_name
- unrestricted_name

col_name_keyword:

referenced by:

- name
- non_reserved_word
- targets
- unrestricted_name

complex_table_pattern:

referenced by:

- table_pattern
- targets

table_pattern:

referenced by:

- table_pattern_list
- targets

table_pattern_list:

referenced by:

- targets

privilege:

referenced by:

- privilege_list

type_list:

referenced by:

- a_expr
- b_expr
- prep_type_clause

transaction_mode_list:

referenced by:

- begin_transaction
- set_session_stmt
- set_transaction_stmt

opt_transaction:

referenced by:

- begin_stmt
- commit_stmt
- rollback_stmt

begin_transaction:

referenced by:

- begin_stmt

opt_abort_mod:

referenced by:

- abort_stmt

alter_table_stmt:

referenced by:

- alter_ddl_stmt

alter_index_stmt:

referenced by:

- alter_ddl_stmt

alter_view_stmt:

referenced by:

- alter_ddl_stmt

alter_sequence_stmt:

referenced by:

- alter_ddl_stmt

alter_database_stmt:

referenced by:

- alter_ddl_stmt

alter_range_stmt:

referenced by:

- alter_ddl_stmt

alter_partition_stmt:

referenced by:

- alter_ddl_stmt

role_or_group_or_user:

referenced by:

- alter_role_stmt
- create_role_stmt
- drop_role_stmt

opt_role_options:

referenced by:

- alter_role_stmt
- create_role_stmt

as_of_clause:

referenced by:

- opt_as_of_clause
- opt_create_stats_options
- transaction_mode

create_changefeed_stmt:

referenced by:

- create_ddl_stmt

create_database_stmt:

referenced by:

- create_ddl_stmt

create_index_stmt:

referenced by:

- create_ddl_stmt

create_schema_stmt:

referenced by:

- create_ddl_stmt

create_table_stmt:

referenced by:

- create_ddl_stmt

create_table_as_stmt:

referenced by:

- create_ddl_stmt

create_view_stmt:

referenced by:

- create_ddl_stmt

create_sequence_stmt:

referenced by:

- create_ddl_stmt

statistics_name:

referenced by:

- create_stats_stmt

opt_stats_columns:

referenced by:

- create_stats_stmt

create_stats_target:

referenced by:

- create_stats_stmt

opt_create_stats_options:

referenced by:

- create_stats_stmt

with_clause:

referenced by:

- opt_with_clause
- select_no_parens

table_name_opt_idx:

referenced by:

- table_expr_opt_alias_idx

where_clause:

referenced by:

- opt_where_clause

sort_clause:

referenced by:

- opt_sort_clause
- select_no_parens

limit_clause:

referenced by:

- opt_limit_clause
- select_limit

target_list:

referenced by:

- returning_clause
- simple_select_clause

drop_database_stmt:

referenced by:

- drop_ddl_stmt

drop_index_stmt:

referenced by:

- drop_ddl_stmt

drop_table_stmt:

referenced by:

- drop_ddl_stmt

drop_view_stmt:

referenced by:

- drop_ddl_stmt

drop_sequence_stmt:

referenced by:

- drop_ddl_stmt

explain_option_name:

referenced by:

- explain_option_list

non_reserved_word_or_sconst:

referenced by:

- opt_encoding_clause
- opt_lc_collate_clause
- opt_lc_ctype_clause
- opt_template_clause
- string_or_placeholder

table_elem:

referenced by:

- table_elem_list

insert_column_item:

referenced by:

- insert_column_list

opt_conf_expr:

referenced by:

- on_conflict

c_expr:

referenced by:

- a_expr
- b_expr
- select_fetch_first_value

cast_target:

referenced by:

- a_expr
- b_expr
- func_expr_common_subexpr

typename:

referenced by:

- a_expr
- alter_table_cmd
- b_expr
- cast_target
- column_def
- func_expr_common_subexpr
- type_list

collation_name:

referenced by:

- a_expr
- col_qualification
- opt_collate

opt_asymmetric:

referenced by:

- a_expr

b_expr:

referenced by:

- a_expr
- b_expr
- col_qualification_elem
- position_list

in_expr:

referenced by:

- a_expr
- multiple_set_clause

subquery_op:

referenced by:

- a_expr

sub_type:

referenced by:

- a_expr

session_var:

referenced by:

- reset_session_stmt
- show_session_stmt

var_name:

referenced by:

- generic_set
- reset_csetting_stmt
- set_csetting_stmt
- show_csettings_stmt
- var_set_list

opt_scrub_options_clause:

referenced by:

- scrub_table_stmt

simple_select:

referenced by:

- select_clause
- select_no_parens

select_clause:

referenced by:

- select_no_parens
- set_operation

for_locking_clause:

referenced by:

- opt_for_locking_clause
- select_no_parens

opt_select_limit:

referenced by:

- select_no_parens

select_limit:

referenced by:

- opt_select_limit
- select_no_parens

opt_for_locking_clause:

referenced by:

- select_no_parens

set_rest_more:

referenced by:

- set_session_stmt

to_or_eq:

referenced by:

- generic_set
- set_csetting_stmt

var_value:

referenced by:

- set_csetting_stmt
- use_stmt
- var_list
- var_set_list

with_comment:

referenced by:

- show_columns_stmt
- show_databases_stmt
- show_indexes_stmt
- show_tables_stmt

opt_on_targets_roles:

referenced by:

- show_grants_stmt

for_grantee_clause:

referenced by:

- show_grants_stmt

opt_cluster:

referenced by:

- show_queries_stmt
- show_sessions_stmt

opt_compact:

referenced by:

- show_trace_stmt

zone_name:

referenced by:

- alter_zone_range_stmt
- show_zone_stmt

opt_partition:

referenced by:

- show_zone_stmt

partition_name:

referenced by:

- alter_zone_partition_stmt
- partition
- show_zone_stmt

relation_expr:

referenced by:

- alter_onetable_stmt
- alter_rename_sequence_stmt
- alter_rename_table_stmt
- alter_rename_view_stmt
- relation_expr_list
- table_ref

set_clause:

referenced by:

- set_clause_list

from_list:

referenced by:

- from_clause
- opt_from_list

simple_db_object_name:

referenced by:

- db_object_name
- table_pattern

complex_db_object_name:

referenced by:

- complex_table_pattern
- db_object_name

kv_option:

referenced by:

- kv_option_list

db_object_name_component:

referenced by:

- column_path_with_star
- complex_db_object_name
- complex_table_pattern
- prefixed_column_path
- simple_db_object_name

unrestricted_name:

referenced by:

- attrs
- collation_name
- column_path_with_star
- complex_db_object_name
- complex_table_pattern
- d_expr
- index_name
- partition_name
- prefixed_column_path
- target_name
- zone_name

transaction_mode:

referenced by:

- transaction_mode_list

opt_comma:

referenced by:

- transaction_mode_list

alter_onetable_stmt:

referenced by:

- alter_table_stmt

alter_split_stmt:

referenced by:

- alter_table_stmt

alter_unsplit_stmt:

referenced by:

- alter_table_stmt

alter_scatter_stmt:

referenced by:

- alter_table_stmt

alter_zone_table_stmt:

referenced by:

- alter_table_stmt

alter_rename_table_stmt:

referenced by:

- alter_table_stmt

alter_oneindex_stmt:

referenced by:

- alter_index_stmt

alter_split_index_stmt:

referenced by:

- alter_index_stmt

alter_unsplit_index_stmt:

referenced by:

- alter_index_stmt

alter_scatter_index_stmt:

referenced by:

- alter_index_stmt

alter_rename_index_stmt:

referenced by:

- alter_index_stmt

alter_zone_index_stmt:

referenced by:

- alter_index_stmt

alter_rename_view_stmt:

referenced by:

- alter_view_stmt

alter_rename_sequence_stmt:

referenced by:

- alter_sequence_stmt

alter_sequence_options_stmt:

referenced by:

- alter_sequence_stmt

alter_rename_database_stmt:

referenced by:

- alter_database_stmt

alter_zone_database_stmt:

referenced by:

- alter_database_stmt

alter_zone_range_stmt:

referenced by:

- alter_range_stmt

alter_zone_partition_stmt:

referenced by:

- alter_partition_stmt

opt_with:

referenced by:

- create_database_stmt
- opt_role_options

role_options:

referenced by:

- opt_role_options

changefeed_targets:

referenced by:

- create_changefeed_stmt

opt_changefeed_sink:

referenced by:

- create_changefeed_stmt

opt_template_clause:

referenced by:

- create_database_stmt

opt_encoding_clause:

referenced by:

- create_database_stmt

opt_lc_collate_clause:

referenced by:

- create_database_stmt

opt_lc_ctype_clause:

referenced by:

- create_database_stmt

opt_unique:

referenced by:

- create_index_stmt

opt_concurrently:

referenced by:

- create_index_stmt
- drop_index_stmt

opt_index_name:

referenced by:

- create_index_stmt
- index_def

opt_using_gin_btree:

referenced by:

- create_index_stmt

index_params:

referenced by:

- alter_table_cmd
- constraint_elem
- create_index_stmt
- index_def

opt_hash_sharded:

referenced by:

- alter_table_cmd
- constraint_elem
- create_index_stmt
- index_def

opt_storing:

referenced by:

- constraint_elem
- create_index_stmt
- index_def

opt_interleave:

referenced by:

- alter_table_cmd
- constraint_elem
- create_index_stmt
- create_table_stmt
- index_def

opt_partition_by:

referenced by:

- constraint_elem
- create_index_stmt
- create_table_stmt
- index_def
- list_partition
- range_partition

schema_name:

referenced by:

- create_schema_stmt

opt_temp_create_table:

referenced by:

- create_table_as_stmt
- create_table_stmt

opt_table_elem_list:

referenced by:

- create_table_stmt

create_as_opt_col_list:

referenced by:

- create_table_as_stmt

opt_temp:

referenced by:

- create_sequence_stmt
- create_view_stmt
- opt_temp_create_table

view_name:

referenced by:

- alter_rename_view_stmt
- create_view_stmt

sequence_name:

referenced by:

- alter_rename_sequence_stmt
- alter_sequence_options_stmt
- create_sequence_stmt

opt_sequence_option_list:

referenced by:

- create_sequence_stmt

cte_list:

referenced by:

- with_clause

opt_index_flags:

referenced by:

- table_name_opt_idx
- table_ref

sortby_list:

referenced by:

- sort_clause

first_or_next:

referenced by:

- limit_clause

select_fetch_first_value:

referenced by:

- limit_clause
- offset_clause

row_or_rows:

referenced by:

- limit_clause
- offset_clause

target_elem:

referenced by:

- target_list

table_index_name_list:

referenced by:

- drop_index_stmt

table_name_list:

referenced by:

- drop_sequence_stmt
- drop_table_stmt
- drop_view_stmt
- opt_locked_rels

non_reserved_word:

referenced by:

- explain_option_name
- non_reserved_word_or_sconst

column_def:

referenced by:

- alter_table_cmd
- table_elem

index_def:

referenced by:

- table_elem

family_def:

referenced by:

- create_as_table_defs
- table_elem

table_constraint:

referenced by:

- alter_table_cmd
- table_elem

column_name:

referenced by:

- alter_table_cmd
- column_def
- create_as_param
- create_as_table_defs
- insert_column_item
- single_set_clause

d_expr:

referenced by:

- c_expr

array_subscripts:

referenced by:

- c_expr

case_expr:

referenced by:

- c_expr

simple_typename:

referenced by:

- typename

opt_array_bounds:

referenced by:

- typename

expr_tuple1_ambiguous:

referenced by:

- in_expr

math_op:

referenced by:

- subquery_op

attrs:

referenced by:

- var_name

scrub_option_list:

referenced by:

- opt_scrub_options_clause

simple_select_clause:

referenced by:

- simple_select

values_clause:

referenced by:

- simple_select

table_clause:

referenced by:

- simple_select

set_operation:

referenced by:

- simple_select

for_locking_items:

referenced by:

- for_locking_clause

offset_clause:

referenced by:

- select_limit

generic_set:

referenced by:

- set_rest_more

extra_var_value:

referenced by:

- var_value

targets_roles:

referenced by:

- opt_on_targets_roles

partition:

referenced by:

- list_partition
- opt_partition
- range_partition

single_set_clause:

referenced by:

- set_clause

multiple_set_clause:

referenced by:

- set_clause

table_ref:

referenced by:

- from_list
- joined_table
- table_clause

cockroachdb_extra_reserved_keyword:

referenced by:

- db_object_name_component
- extra_var_value
- reserved_keyword

type_func_name_keyword:

referenced by:

- non_reserved_word
- type_function_name
- unrestricted_name

reserved_keyword:

referenced by:

- unrestricted_name

transaction_user_priority:

referenced by:

- transaction_mode

transaction_read_mode:

referenced by:

- transaction_mode

alter_table_cmds:

referenced by:

- alter_onetable_stmt

set_zone_config:

referenced by:

- alter_zone_database_stmt
- alter_zone_index_stmt
- alter_zone_partition_stmt
- alter_zone_range_stmt
- alter_zone_table_stmt

alter_index_cmds:

referenced by:

- alter_oneindex_stmt

sequence_option_list:

referenced by:

- alter_sequence_options_stmt
- opt_sequence_option_list

role_option:

referenced by:

- role_options

single_table_pattern_list:

referenced by:

- changefeed_targets

opt_equal:

referenced by:

- opt_encoding_clause
- opt_lc_collate_clause
- opt_lc_ctype_clause
- opt_template_clause

opt_name:

referenced by:

- index_def
- opt_family_name
- opt_index_name

index_elem:

referenced by:

- index_params

storing:

referenced by:

- opt_storing

partition_by:

referenced by:

- alter_index_cmd
- alter_table_cmd
- opt_partition_by

create_as_table_defs:

referenced by:

- create_as_opt_col_list

common_table_expr:

referenced by:

- cte_list

index_flags_param_list:

referenced by:

- opt_index_flags

sortby:

referenced by:

- sortby_list

only_signed_iconst:

referenced by:

- select_fetch_first_value
- signed_iconst

only_signed_fconst:

referenced by:

- select_fetch_first_value

target_name:

referenced by:

- target_elem

col_qual_list:

referenced by:

- column_def

opt_family_name:

referenced by:

- family_def

constraint_name:

referenced by:

- alter_table_cmd
- col_qualification
- table_constraint

constraint_elem:

referenced by:

- table_constraint

const_typename:

referenced by:

- d_expr
- simple_typename

interval_value:

referenced by:

- d_expr

column_path_with_star:

referenced by:

- d_expr

func_expr:

referenced by:

- d_expr

labeled_row:

referenced by:

- d_expr

row:

referenced by:

- d_expr
- labeled_row

array_expr:

referenced by:

- array_expr_list
- d_expr

array_subscript:

referenced by:

- array_subscripts

case_arg:

referenced by:

- case_expr

when_clause_list:

referenced by:

- case_expr

case_default:

referenced by:

- case_expr

bit_with_length:

referenced by:

- simple_typename

character_with_length:

referenced by:

- simple_typename

interval_type:

referenced by:

- simple_typename

postgres_oid:

referenced by:

- simple_typename

tuple1_ambiguous_values:

referenced by:

- expr_tuple1_ambiguous

scrub_option:

referenced by:

- scrub_option_list

opt_all_clause:

referenced by:

- simple_select_clause

from_clause:

referenced by:

- simple_select_clause

group_clause:

referenced by:

- simple_select_clause

having_clause:

referenced by:

- simple_select_clause

window_clause:

referenced by:

- simple_select_clause

distinct_on_clause:

referenced by:

- simple_select_clause

all_or_distinct:

referenced by:

- set_operation

for_locking_item:

referenced by:

- for_locking_items

var_list:

referenced by:

- generic_set

opt_ordinality:

referenced by:

- table_ref

opt_alias_clause:

referenced by:

- table_ref

joined_table:

referenced by:

- joined_table
- table_ref

alias_clause:

referenced by:

- opt_alias_clause
- table_ref

func_table:

referenced by:

- table_ref

row_source_extension_stmt:

referenced by:

- table_ref

user_priority:

referenced by:

- transaction_user_priority

alter_table_cmd:

referenced by:

- alter_table_cmds

var_set_list:

referenced by:

- set_zone_config

alter_index_cmd:

referenced by:

- alter_index_cmds

sequence_option_elem:

referenced by:

- sequence_option_list

password_clause:

referenced by:

- role_option

valid_until_clause:

referenced by:

- role_option

opt_asc_desc:

referenced by:

- index_elem
- sortby

opt_nulls_order:

referenced by:

- index_elem
- sortby

list_partitions:

referenced by:

- partition_by

range_partitions:

referenced by:

- partition_by

create_as_col_qual_list:

referenced by:

- create_as_table_defs

create_as_constraint_def:

referenced by:

- create_as_table_defs

index_flags_param:

referenced by:

- index_flags_param_list

col_qualification:

referenced by:

- col_qual_list

key_match:

referenced by:

- col_qualification_elem
- constraint_elem

reference_actions:

referenced by:

- col_qualification_elem
- constraint_elem

numeric:

referenced by:

- const_typename

bit_without_length:

referenced by:

- const_typename

character_without_length:

referenced by:

- const_typename

const_datetime:

referenced by:

- const_typename

const_json:

referenced by:

- const_typename

opt_interval_qualifier:

referenced by:

- interval_value

func_application:

referenced by:

- func_expr
- func_expr_windowless

filter_clause:

referenced by:

- func_expr

over_clause:

referenced by:

- func_expr

func_expr_common_subexpr:

referenced by:

- func_expr
- func_expr_windowless

opt_expr_list:

referenced by:

- array_expr
- row
- substr_list

expr_tuple_unambiguous:

referenced by:

- row

array_expr_list:

referenced by:

- array_expr

opt_slice_bound:

referenced by:

- array_subscript

when_clause:

referenced by:

- when_clause_list

opt_varying:

referenced by:

- bit_with_length

character_base:

referenced by:

- character_with_length
- character_without_length

interval_qualifier:

referenced by:

- interval_type
- opt_interval_qualifier

window_definition_list:

referenced by:

- window_clause

for_locking_strength:

referenced by:

- for_locking_item

opt_locked_rels:

referenced by:

- for_locking_item

opt_nowait_or_skip:

referenced by:

- for_locking_item

opt_join_hint:

referenced by:

- joined_table

join_type:

referenced by:

- joined_table

join_qual:

referenced by:

- joined_table

func_expr_windowless:

referenced by:

- func_table
- rowsfrom_item

rowsfrom_list:

referenced by:

- func_table

opt_column:

referenced by:

- alter_table_cmd

alter_column_default:

referenced by:

- alter_table_cmd

opt_set_data:

referenced by:

- alter_table_cmd

opt_collate:

referenced by:

- alter_table_cmd

opt_alter_column_using:

referenced by:

- alter_table_cmd

opt_validate_behavior:

referenced by:

- alter_table_cmd

audit_mode:

referenced by:

- alter_table_cmd

signed_iconst64:

referenced by:

- sequence_option_elem

list_partition:

referenced by:

- list_partitions

range_partition:

referenced by:

- range_partitions

create_as_col_qualification:

referenced by:

- create_as_col_qual_list

create_as_constraint_elem:

referenced by:

- create_as_constraint_def

col_qualification_elem:

referenced by:

- col_qualification

family_name:

referenced by:

- col_qualification
- create_as_col_qualification

reference_on_update:

referenced by:

- reference_actions

reference_on_delete:

referenced by:

- reference_actions

opt_float:

referenced by:

- numeric

opt_numeric_modifiers:

referenced by:

- numeric

opt_timezone:

referenced by:

- const_datetime

func_name:

referenced by:

- func_application

window_specification:

referenced by:

- over_clause
- window_definition

window_name:

referenced by:

- over_clause
- window_definition

special_function:

referenced by:

- func_expr_common_subexpr

tuple1_unambiguous_values:

referenced by:

- expr_tuple_unambiguous

char_aliases:

referenced by:

- character_base

interval_second:

referenced by:

- interval_qualifier

window_definition:

referenced by:

- window_definition_list

join_outer:

referenced by:

- join_type

rowsfrom_item:

referenced by:

- rowsfrom_list

signed_iconst:

referenced by:

- signed_iconst64

create_as_col_qualification_elem:

referenced by:

- create_as_col_qualification

create_as_params:

referenced by:

- create_as_constraint_elem

opt_name_parens:

referenced by:

- col_qualification_elem

reference_action:

referenced by:

- reference_on_delete
- reference_on_update

type_function_name:

referenced by:

- func_name

opt_existing_window_name:

referenced by:

- window_specification

opt_partition_clause:

referenced by:

- window_specification

opt_frame_clause:

referenced by:

- window_specification

extract_list:

referenced by:

- special_function

overlay_list:

referenced by:

- special_function

position_list:

referenced by:

- special_function

substr_list:

referenced by:

- special_function

trim_list:

referenced by:

- special_function

create_as_param:

referenced by:

- create_as_params

frame_extent:

referenced by:

- opt_frame_clause

opt_frame_exclusion:

referenced by:

- opt_frame_clause

extract_arg:

referenced by:

- extract_list

overlay_placing:

referenced by:

- overlay_list

substr_from:

referenced by:

- overlay_list
- substr_list

substr_for:

referenced by:

- overlay_list
- substr_list

frame_bound:

referenced by:

- frame_extent

generated by Railroad Diagram Generator