Supported SQL Syntax

The EBNF and Railroad Diagrams for the supported SQL Syntax.

CompilationUnit

direct_SQL_statement EOF
         ::= direct_SQL_statement* EOF
Not referenced by any.

non_reserved_word

A ABSOLUTE ACTION ADA ADD ADMIN AFTER ALWAYS ASC ASSERTION ASSIGNMENT ATTRIBUTE ATTRIBUTES BEFORE BERNOULLI BREADTH C CASCADE CATALOG CATALOG_NAME CHAIN CHARACTER_SET_CATALOG CHARACTER_SET_NAME CHARACTER_SET_SCHEMA CHARACTERISTICS CHARACTERS CLASS_ORIGIN COBOL COLLATION COLLATION_CATALOG COLLATION_NAME COLLATION_SCHEMA COLUMN_NAME COMMAND_FUNCTION COMMAND_FUNCTION_CODE COMMITTED CONDITION_NUMBER CONNECTION CONNECTION_NAME CONSTRAINT_CATALOG CONSTRAINT_NAME CONSTRAINT_SCHEMA CONSTRAINTS CONSTRUCTOR CONTAINS CONTINUE CURSOR_NAME DATA DATETIME_INTERVAL_CODE DATETIME_INTERVAL_PRECISION DEFAULTS DEFERRABLE DEFERRED DEFINED DEFINER DEGREE DEPTH DERIVED DESC DESCRIPTOR DIAGNOSTICS DISPATCH DOMAIN DYNAMIC_FUNCTION DYNAMIC_FUNCTION_CODE ENFORCED EQUALS EXCLUDE EXCLUDING EXPRESSION FINAL FIRST FLAG FOLLOWING FORTRAN FOUND G GENERAL GENERATED GO GOTO GRANTED HIERARCHY IF IGNORE IMMEDIATE IMPLEMENTATION INCLUDING INCREMENT INITIALLY INPUT INSTANCE INSTANTIABLE INSTEAD INVOKER ISOLATION K KEY KEY_MEMBER KEY_TYPE LAST LENGTH LEVEL LOCATOR M MAP MATCHED MAXVALUE MESSAGE_LENGTH MESSAGE_OCTET_LENGTH MESSAGE_TEXT MINVALUE MORE MUMPS NAMES NESTING NEXT NFC NFD NFKC NFKD NORMALIZED NULLABLE NULLS NUMBER OBJECT OCTETS OPTION OPTIONS ORDERING ORDINALITY OTHERS OUTPUT OVERRIDING P PAD PARAMETER_MODE PARAMETER_NAME PARAMETER_ORDINAL_POSITION PARAMETER_SPECIFIC_CATALOG PARAMETER_SPECIFIC_NAME PARAMETER_SPECIFIC_SCHEMA PARTIAL PASCAL PATH PLACING PLI PRECEDING PRESERVE PRIOR PRIVILEGES PROPERTIES PUBLIC READ RELATIVE REPEATABLE RESPECT RESTART RESTRICT RETURNED_CARDINALITY RETURNED_LENGTH RETURNED_OCTET_LENGTH RETURNED_SQLSTATE ROLE ROUTINE ROUTINE_CATALOG ROUTINE_NAME ROUTINE_SCHEMA ROW_COUNT SCALE SCHEMA SCHEMA_NAME SCOPE_CATALOG SCOPE_NAME SCOPE_SCHEMA SECTION SECURITY SELF SEQUENCE SERIALIZABLE SERVER_NAME SESSION SETS SIMPLE SIZE SOURCE SPACE SPECIFIC_NAME STATE STATEMENT STRUCTURE STYLE SUBCLASS_ORIGIN T TABLE_NAME TEMPORARY TIES TOP_LEVEL_COUNT TRANSACTION TRANSACTION_ACTIVE TRANSACTIONS_COMMITTED TRANSACTIONS_ROLLED_BACK TRANSFORM TRANSFORMS TRIGGER_CATALOG TRIGGER_NAME TRIGGER_SCHEMA TRY_CAST TYPE UNBOUNDED UNCOMMITTED UNDER UNNAMED USAGE USER_DEFINED_TYPE_CATALOG USER_DEFINED_TYPE_CODE USER_DEFINED_TYPE_NAME USER_DEFINED_TYPE_SCHEMA VIEW WORK WRITE ZONE ABS ALL ARRAY_AGG AT AVG BLOB BOTH CARDINALITY CLOSE COLUMN CONDITION COUNT CUBE CURRENT CURRENT_CATALOG CURRENT_DATE CURRENT_DEFAULT_TRANSFORM_GROUP CURRENT_PATH CURRENT_ROLE CURRENT_SCHEMA CURRENT_TIME CURRENT_TIMESTAMP CURRENT_TRANSFORM_GROUP_FOR_TYPE CURRENT_USER CURSOR CYCLE DATE DAY DAYS DEC DYNAMIC EXP EXTERNAL FILTER FLOOR FREE FUNCTION GLOBAL HOLD HOUR HOURS IDENTITY INDICATOR INTERSECTION INTERVAL LANGUAGE LEAD LOCAL LOWER MAX MERGE METHOD MIN MINUTE MINUTES MOD MODULE MONTH MONTHS NAME NEW NONE OCCURRENCE OFFSET OLD OPEN PARTITION POSITION POWER PRECISION RANGE RANK READS REF REFERENCES RELEASE RESULT RETURNS ROLLUP ROW ROW_NUMBER ROWS SAVEPOINT SCOPE SEARCH SECOND SECONDS SESSION_USER SQL START STATIC SUM SYSTEM TIME TIMESTAMP TIMEZONE_HOUR TIMEZONE_MINUTE TRIGGER TRUNCATE UNKNOWN UPDATE UPPER USER VALUE VALUES VERSION VERSIONS WINDOW YEAR YEARS COMMENT DEFAULT USE LIMIT NUMERIC_HISTOGRAM REPLACE HISTOGRAM APPROEX_PERCENTILE MAP_AGG SET_AGG MAP_UNION "COUNT"
         ::= 'A'
           | 'ABSOLUTE'
           | 'ACTION'
           | 'ADA'
           | 'ADD'
           | 'ADMIN'
           | 'AFTER'
           | 'ALWAYS'
           | 'ASC'
           | 'ASSERTION'
           | 'ASSIGNMENT'
           | 'ATTRIBUTE'
           | 'ATTRIBUTES'
           | 'BEFORE'
           | 'BERNOULLI'
           | 'BREADTH'
           | 'C'
           | 'CASCADE'
           | 'CATALOG'
           | 'CATALOG_NAME'
           | 'CHAIN'
           | 'CHARACTER_SET_CATALOG'
           | 'CHARACTER_SET_NAME'
           | 'CHARACTER_SET_SCHEMA'
           | 'CHARACTERISTICS'
           | 'CHARACTERS'
           | 'CLASS_ORIGIN'
           | 'COBOL'
           | 'COLLATION'
           | 'COLLATION_CATALOG'
           | 'COLLATION_NAME'
           | 'COLLATION_SCHEMA'
           | 'COLUMN_NAME'
           | 'COMMAND_FUNCTION'
           | 'COMMAND_FUNCTION_CODE'
           | 'COMMITTED'
           | 'CONDITION_NUMBER'
           | 'CONNECTION'
           | 'CONNECTION_NAME'
           | 'CONSTRAINT_CATALOG'
           | 'CONSTRAINT_NAME'
           | 'CONSTRAINT_SCHEMA'
           | 'CONSTRAINTS'
           | 'CONSTRUCTOR'
           | 'CONTAINS'
           | 'CONTINUE'
           | 'CURSOR_NAME'
           | 'DATA'
           | 'DATETIME_INTERVAL_CODE'
           | 'DATETIME_INTERVAL_PRECISION'
           | 'DEFAULTS'
           | 'DEFERRABLE'
           | 'DEFERRED'
           | 'DEFINED'
           | 'DEFINER'
           | 'DEGREE'
           | 'DEPTH'
           | 'DERIVED'
           | 'DESC'
           | 'DESCRIPTOR'
           | 'DIAGNOSTICS'
           | 'DISPATCH'
           | 'DOMAIN'
           | 'DYNAMIC_FUNCTION'
           | 'DYNAMIC_FUNCTION_CODE'
           | 'ENFORCED'
           | 'EQUALS'
           | 'EXCLUDE'
           | 'EXCLUDING'
           | 'EXPRESSION'
           | 'FINAL'
           | 'FIRST'
           | 'FLAG'
           | 'FOLLOWING'
           | 'FORTRAN'
           | 'FOUND'
           | 'G'
           | 'GENERAL'
           | 'GENERATED'
           | 'GO'
           | 'GOTO'
           | 'GRANTED'
           | 'HIERARCHY'
           | 'IF'
           | 'IGNORE'
           | 'IMMEDIATE'
           | 'IMPLEMENTATION'
           | 'INCLUDING'
           | 'INCREMENT'
           | 'INITIALLY'
           | 'INPUT'
           | 'INSTANCE'
           | 'INSTANTIABLE'
           | 'INSTEAD'
           | 'INVOKER'
           | 'ISOLATION'
           | 'K'
           | 'KEY'
           | 'KEY_MEMBER'
           | 'KEY_TYPE'
           | 'LAST'
           | 'LENGTH'
           | 'LEVEL'
           | 'LOCATOR'
           | 'M'
           | 'MAP'
           | 'MATCHED'
           | 'MAXVALUE'
           | 'MESSAGE_LENGTH'
           | 'MESSAGE_OCTET_LENGTH'
           | 'MESSAGE_TEXT'
           | 'MINVALUE'
           | 'MORE'
           | 'MUMPS'
           | 'NAMES'
           | 'NESTING'
           | 'NEXT'
           | 'NFC'
           | 'NFD'
           | 'NFKC'
           | 'NFKD'
           | 'NORMALIZED'
           | 'NULLABLE'
           | 'NULLS'
           | 'NUMBER'
           | 'OBJECT'
           | 'OCTETS'
           | 'OPTION'
           | 'OPTIONS'
           | 'ORDERING'
           | 'ORDINALITY'
           | 'OTHERS'
           | 'OUTPUT'
           | 'OVERRIDING'
           | 'P'
           | 'PAD'
           | 'PARAMETER_MODE'
           | 'PARAMETER_NAME'
           | 'PARAMETER_ORDINAL_POSITION'
           | 'PARAMETER_SPECIFIC_CATALOG'
           | 'PARAMETER_SPECIFIC_NAME'
           | 'PARAMETER_SPECIFIC_SCHEMA'
           | 'PARTIAL'
           | 'PASCAL'
           | 'PATH'
           | 'PLACING'
           | 'PLI'
           | 'PRECEDING'
           | 'PRESERVE'
           | 'PRIOR'
           | 'PRIVILEGES'
           | 'PROPERTIES'
           | 'PUBLIC'
           | 'READ'
           | 'RELATIVE'
           | 'REPEATABLE'
           | 'RESPECT'
           | 'RESTART'
           | 'RESTRICT'
           | 'RETURNED_CARDINALITY'
           | 'RETURNED_LENGTH'
           | 'RETURNED_OCTET_LENGTH'
           | 'RETURNED_SQLSTATE'
           | 'ROLE'
           | 'ROUTINE'
           | 'ROUTINE_CATALOG'
           | 'ROUTINE_NAME'
           | 'ROUTINE_SCHEMA'
           | 'ROW_COUNT'
           | 'SCALE'
           | 'SCHEMA'
           | 'SCHEMA_NAME'
           | 'SCOPE_CATALOG'
           | 'SCOPE_NAME'
           | 'SCOPE_SCHEMA'
           | 'SECTION'
           | 'SECURITY'
           | 'SELF'
           | 'SEQUENCE'
           | 'SERIALIZABLE'
           | 'SERVER_NAME'
           | 'SESSION'
           | 'SETS'
           | 'SIMPLE'
           | 'SIZE'
           | 'SOURCE'
           | 'SPACE'
           | 'SPECIFIC_NAME'
           | 'STATE'
           | 'STATEMENT'
           | 'STRUCTURE'
           | 'STYLE'
           | 'SUBCLASS_ORIGIN'
           | 'T'
           | 'TABLE_NAME'
           | 'TEMPORARY'
           | 'TIES'
           | 'TOP_LEVEL_COUNT'
           | 'TRANSACTION'
           | 'TRANSACTION_ACTIVE'
           | 'TRANSACTIONS_COMMITTED'
           | 'TRANSACTIONS_ROLLED_BACK'
           | 'TRANSFORM'
           | 'TRANSFORMS'
           | 'TRIGGER_CATALOG'
           | 'TRIGGER_NAME'
           | 'TRIGGER_SCHEMA'
           | 'TRY_CAST'
           | 'TYPE'
           | 'UNBOUNDED'
           | 'UNCOMMITTED'
           | 'UNDER'
           | 'UNNAMED'
           | 'USAGE'
           | 'USER_DEFINED_TYPE_CATALOG'
           | 'USER_DEFINED_TYPE_CODE'
           | 'USER_DEFINED_TYPE_NAME'
           | 'USER_DEFINED_TYPE_SCHEMA'
           | 'VIEW'
           | 'WORK'
           | 'WRITE'
           | 'ZONE'
           | 'ABS'
           | 'ALL'
           | 'ARRAY_AGG'
           | 'AT'
           | 'AVG'
           | 'BLOB'
           | 'BOTH'
           | 'CARDINALITY'
           | 'CLOSE'
           | 'COLUMN'
           | 'CONDITION'
           | 'COUNT'
           | 'CUBE'
           | 'CURRENT'
           | 'CURRENT_CATALOG'
           | 'CURRENT_DATE'
           | 'CURRENT_DEFAULT_TRANSFORM_GROUP'
           | 'CURRENT_PATH'
           | 'CURRENT_ROLE'
           | 'CURRENT_SCHEMA'
           | 'CURRENT_TIME'
           | 'CURRENT_TIMESTAMP'
           | 'CURRENT_TRANSFORM_GROUP_FOR_TYPE'
           | 'CURRENT_USER'
           | 'CURSOR'
           | 'CYCLE'
           | 'DATE'
           | 'DAY'
           | 'DAYS'
           | 'DEC'
           | 'DYNAMIC'
           | 'EXP'
           | 'EXTERNAL'
           | 'FILTER'
           | 'FLOOR'
           | 'FREE'
           | 'FUNCTION'
           | 'GLOBAL'
           | 'HOLD'
           | 'HOUR'
           | 'HOURS'
           | 'IDENTITY'
           | 'INDICATOR'
           | 'INTERSECTION'
           | 'INTERVAL'
           | 'LANGUAGE'
           | 'LEAD'
           | 'LOCAL'
           | 'LOWER'
           | 'MAX'
           | 'MERGE'
           | 'METHOD'
           | 'MIN'
           | 'MINUTE'
           | 'MINUTES'
           | 'MOD'
           | 'MODULE'
           | 'MONTH'
           | 'MONTHS'
           | 'NAME'
           | 'NEW'
           | 'NONE'
           | 'OCCURRENCE'
           | 'OFFSET'
           | 'OLD'
           | 'OPEN'
           | 'PARTITION'
           | 'POSITION'
           | 'POWER'
           | 'PRECISION'
           | 'RANGE'
           | 'RANK'
           | 'READS'
           | 'REF'
           | 'REFERENCES'
           | 'RELEASE'
           | 'RESULT'
           | 'RETURNS'
           | 'ROLLUP'
           | 'ROW'
           | 'ROW_NUMBER'
           | 'ROWS'
           | 'SAVEPOINT'
           | 'SCOPE'
           | 'SEARCH'
           | 'SECOND'
           | 'SECONDS'
           | 'SESSION_USER'
           | 'SQL'
           | 'START'
           | 'STATIC'
           | 'SUM'
           | 'SYSTEM'
           | 'TIME'
           | 'TIMESTAMP'
           | 'TIMEZONE_HOUR'
           | 'TIMEZONE_MINUTE'
           | 'TRIGGER'
           | 'TRUNCATE'
           | 'UNKNOWN'
           | 'UPDATE'
           | 'UPPER'
           | 'USER'
           | 'VALUE'
           | 'VALUES'
           | 'VERSION'
           | 'VERSIONS'
           | 'WINDOW'
           | 'YEAR'
           | 'YEARS'
           | 'COMMENT'
           | 'DEFAULT'
           | 'USE'
           | 'LIMIT'
           | 'NUMERIC_HISTOGRAM'
           | 'REPLACE'
           | 'HISTOGRAM'
           | 'APPROEX_PERCENTILE'
           | 'MAP_AGG'
           | 'SET_AGG'
           | 'MAP_UNION'
           | '"COUNT"'
Referenced by:

left_bracket_or_trigraph

[ ??(
         ::= '['
           | '??('

right_bracket_or_trigraph

] ??)
         ::= ']'
           | '??)'

literal

signed_numeric_literal general_literal
           | general_literal

signed_numeric_literal

+ - unsigned_numeric_literal
         ::= ( '+' | '-' )? unsigned_numeric_literal

unsigned_literal

unsigned_numeric_literal general_literal
         ::= unsigned_numeric_literal
           | general_literal

unsigned_numeric_literal

exact_numeric_literal approximate_numeric_literal
         ::= exact_numeric_literal
           | approximate_numeric_literal

exact_numeric_literal

unsigned_integer float_literal
         ::= unsigned_integer
           | float_literal
Referenced by:

general_literal

character_string_literal national_character_string_literal Unicode_character_string_literal binary_string_literal datetime_literal interval_literal boolean_literal
         ::= character_string_literal
           | national_character_string_literal
           | Unicode_character_string_literal
           | binary_string_literal
           | datetime_literal
           | interval_literal
           | boolean_literal
Referenced by:

character_string_literal

_ character_set_specification quoted_string
         ::= ( '_' character_set_specification )? quoted_string+

Unicode_character_string_literal

_ character_set_specification unicode_literal
         ::= ( '_' character_set_specification )? unicode_literal
Referenced by:

datetime_literal

date_literal time_literal timestamp_literal
         ::= date_literal
           | time_literal
           | timestamp_literal
Referenced by:

date_literal

DATE character_string_literal
         ::= 'DATE' character_string_literal
Referenced by:

time_literal

TIME character_string_literal
         ::= 'TIME' character_string_literal
Referenced by:

timestamp_literal

TIMESTAMP character_string_literal
         ::= 'TIMESTAMP' character_string_literal
Referenced by:

interval_literal

INTERVAL + - character_string_literal interval_qualifier
         ::= 'INTERVAL' ( '+' | '-' )? character_string_literal interval_qualifier
Referenced by:

boolean_literal

TRUE FALSE UNKNOWN
         ::= 'TRUE'
           | 'FALSE'
           | 'UNKNOWN'
Referenced by:

identifier

actual_identifier _ identifier_suffix_chain
         ::= ( actual_identifier | '_' ) identifier_suffix_chain?

actual_identifier

regular_identifier delimited_identifier Unicode_delimited_identifier non_reserved_word
         ::= regular_identifier
           | delimited_identifier
           | Unicode_delimited_identifier
           | non_reserved_word

table_name

identifier_chain
         ::= identifier_chain

schema_name

identifier_chain
         ::= identifier_chain

catalog_name

identifier
         ::= identifier
Not referenced by any.

schema_qualified_name

identifier_chain
         ::= identifier_chain

local_or_schema_qualified_name

identifier_chain
         ::= identifier_chain
Not referenced by any.

local_or_schema_qualifier

MODULE schema_name
         ::= 'MODULE'
           | schema_name
Not referenced by any.

cursor_name

identifier_chain
         ::= identifier_chain

host_parameter_name

: identifier
         ::= ':' identifier

external_routine_name

identifier character_string_literal
         ::= identifier
           | character_string_literal

character_set_name

schema_name . SQL_language_identifier
         ::= ( schema_name '.' )? SQL_language_identifier

schema_resolved_user_defined_type_name

user_defined_type_name
         ::= user_defined_type_name

user_defined_type_name

identifier_chain
         ::= identifier_chain

SQL_identifier

identifier extended_identifier
         ::= identifier
           | extended_identifier

extended_identifier

scope_option simple_value_specification

dynamic_cursor_name

cursor_name extended_cursor_name
         ::= cursor_name
           | extended_cursor_name

extended_cursor_name

scope_option simple_value_specification

descriptor_name

identifier extended_descriptor_name
         ::= identifier
           | extended_descriptor_name

extended_descriptor_name

scope_option simple_value_specification
Referenced by:

scope_option

GLOBAL LOCAL
         ::= 'GLOBAL'
           | 'LOCAL'

data_type

predefined_type row_type reference_type presto_generic_type path_resolved_user_defined_type_name collection_type

predefined_type

character_string_type CHARACTER SET character_set_specification national_character_string_type collate_clause binary_string_type numeric_type BOOLEAN datetime_type interval_type
           | binary_string_type
           | numeric_type
           | 'BOOLEAN'
           | datetime_type
           | interval_type

character_string_type

CHARACTER CHAR VARYING ( character_length ) VARCHAR ( character_length ) character_large_object_type
         ::= ( 'CHARACTER' | 'CHAR' ) ( 'VARYING'? '(' character_length ')' )?
           | 'VARCHAR' ( '(' character_length ')' )?
           | character_large_object_type
Referenced by:

character_large_object_type

CHARACTER CHAR LARGE OBJECT CLOB ( character_large_object_length )
         ::= ( ( 'CHARACTER' | 'CHAR' ) 'LARGE' 'OBJECT' | 'CLOB' ) ( '(' character_large_object_length ')' )?
Referenced by:

national_character_string_type

NATIONAL CHARACTER CHAR NCHAR VARYING ( character_length ) national_character_large_object_type
         ::= ( 'NATIONAL' ( 'CHARACTER' | 'CHAR' ) | 'NCHAR' ) ( 'VARYING'? '(' character_length ')' )?
           | national_character_large_object_type
Referenced by:

national_character_large_object_type

NATIONAL CHARACTER NCHAR LARGE OBJECT NCLOB ( character_large_object_length )
         ::= ( ( 'NATIONAL' 'CHARACTER' | 'NCHAR' ) 'LARGE' 'OBJECT' | 'NCLOB' ) ( '(' character_large_object_length ')' )?

binary_string_type

BINARY VARYING ( unsigned_integer ) VARBINARY ( unsigned_integer ) binary_large_object_string_type
         ::= 'BINARY' ( 'VARYING'? '(' unsigned_integer ')' )?
           | 'VARBINARY' ( '(' unsigned_integer ')' )?
           | binary_large_object_string_type
Referenced by:

binary_large_object_string_type

BINARY LARGE OBJECT BLOB ( large_object_length )
         ::= ( 'BINARY' 'LARGE' 'OBJECT' | 'BLOB' ) ( '(' large_object_length ')' )?
Referenced by:

numeric_type

exact_numeric_type approximate_numeric_type
         ::= exact_numeric_type
           | approximate_numeric_type
Referenced by:

exact_numeric_type

NUMERIC DECIMAL DEC ( unsigned_integer , unsigned_integer ) SMALLINT INTEGER INT BIGINT
         ::= ( 'NUMERIC' | 'DECIMAL' | 'DEC' ) ( '(' unsigned_integer ( ',' unsigned_integer )? ')' )?
           | 'SMALLINT'
           | 'INTEGER'
           | 'INT'
           | 'BIGINT'
Referenced by:

approximate_numeric_type

FLOAT ( unsigned_integer ) REAL DOUBLE PRECISION
         ::= 'FLOAT' ( '(' unsigned_integer ')' )?
           | 'REAL'
           | 'DOUBLE' 'PRECISION'?
Referenced by:

character_length

unsigned_integer char_length_units
         ::= unsigned_integer char_length_units?

large_object_length

unsigned_integer multiplier large_object_length_token
         ::= unsigned_integer multiplier?
           | large_object_length_token

character_large_object_length

large_object_length char_length_units
         ::= large_object_length char_length_units?

char_length_units

CHARACTERS OCTETS
         ::= 'CHARACTERS'
           | 'OCTETS'

datetime_type

DATE TIME TIMESTAMP ( unsigned_integer ) with_or_without_time_zone
         ::= 'DATE'
           | ( 'TIME' | 'TIMESTAMP' ) ( '(' unsigned_integer ')' )? with_or_without_time_zone?
Referenced by:

with_or_without_time_zone

WITH WITHOUT TIME ZONE
         ::= ( 'WITH' | 'WITHOUT' ) 'TIME' 'ZONE'
Referenced by:

interval_type

INTERVAL interval_qualifier
         ::= 'INTERVAL' interval_qualifier
Referenced by:

row_type

ROW row_type_body
Referenced by:

row_type_body

( field_definition , )
         ::= '(' field_definition ( ',' field_definition )* ')'
Referenced by:

reference_type

REF ( referenced_type ) scope_clause
         ::= 'REF' '(' referenced_type ')' scope_clause?
Referenced by:

scope_clause

SCOPE table_name
         ::= 'SCOPE' table_name

referenced_type

path_resolved_user_defined_type_name
Referenced by:

path_resolved_user_defined_type_name

user_defined_type_name
         ::= user_defined_type_name

collection_type

array_type MULTISET
         ::= array_type
           | 'MULTISET'
Referenced by:

array_type

ARRAY left_bracket_or_trigraph unsigned_integer right_bracket_or_trigraph
Referenced by:

field_definition

identifier data_type
         ::= identifier data_type
Referenced by:

value_expression_primary

parenthesized_value_expression nonparenthesized_value_expression_primary
         ::= parenthesized_value_expression

parenthesized_value_expression

( value_expression , ) primary_suffix
         ::= '(' value_expression ( ',' value_expression )* ')' primary_suffix*
Referenced by:

nonparenthesized_value_expression_primary

set_function_specification subquery case_expression cast_specification subtype_treatment new_specification reference_resolution collection_value_constructor multiset_element_reference next_value_expression window_function_type ( column_name_list ) unsigned_value_specification column_reference primary_suffix contextually_typed_value_specification

primary_suffix

field_reference attribute_or_method_reference method_invocation window_function array_element_reference static_method_invocation
         ::= field_reference
           | attribute_or_method_reference
           | method_invocation
           | window_function
           | array_element_reference
           | static_method_invocation

collection_value_constructor

array_value_constructor multiset_value_constructor
         ::= array_value_constructor
           | multiset_value_constructor

value_specification

literal general_value_specification
         ::= literal
           | general_value_specification

unsigned_value_specification

unsigned_literal general_value_specification
         ::= unsigned_literal
           | general_value_specification

general_value_specification

identifier_chain CURRENT_USER USER ? host_parameter_name current_collation_specification SESSION_USER SYSTEM_USER CURRENT_CATALOG CURRENT_PATH CURRENT_ROLE CURRENT_SCHEMA VALUE CURRENT_DEFAULT_TRANSFORM_GROUP CURRENT_TRANSFORM_GROUP_FOR_TYPE path_resolved_user_defined_type_name
         ::= identifier_chain
           | 'CURRENT_USER'
           | 'USER'
           | '?'
           | host_parameter_name
           | current_collation_specification
           | 'SESSION_USER'
           | 'SYSTEM_USER'
           | 'CURRENT_CATALOG'
           | 'CURRENT_PATH'
           | 'CURRENT_ROLE'
           | 'CURRENT_SCHEMA'
           | 'VALUE'
           | 'CURRENT_DEFAULT_TRANSFORM_GROUP'
           | 'CURRENT_TRANSFORM_GROUP_FOR_TYPE' path_resolved_user_defined_type_name

simple_value_specification

literal identifier_chain host_parameter_name
         ::= literal
           | identifier_chain
           | host_parameter_name

target_specification

identifier_chain column_reference target_array_element_specification ?

simple_target_specification

identifier_chain column_reference
         ::= identifier_chain
           | column_reference

target_array_element_specification

left_bracket_or_trigraph simple_value_specification right_bracket_or_trigraph
Referenced by:

current_collation_specification

COLLATION FOR ( string_value_expression )
         ::= 'COLLATION' 'FOR' '(' string_value_expression ')'

contextually_typed_value_specification

implicitly_typed_value_specification DEFAULT
           | 'DEFAULT'

implicitly_typed_value_specification

NULL empty_specification
         ::= 'NULL'
           | empty_specification

empty_specification

ARRAY MULTISET left_bracket_or_trigraph right_bracket_or_trigraph
         ::= ( 'ARRAY' | 'MULTISET' ) left_bracket_or_trigraph right_bracket_or_trigraph

identifier_chain

identifier .
         ::= identifier ( '.' identifier )*

column_reference

identifier_chain MODULE . identifier . identifier
         ::= identifier_chain
           | 'MODULE' '.' identifier '.' identifier

set_function_specification

aggregate_function grouping_operation
         ::= aggregate_function
           | grouping_operation

grouping_operation

GROUPING ( column_reference , )
         ::= 'GROUPING' '(' column_reference ( ',' column_reference )* ')'

window_function

OVER window_name_or_specification
         ::= 'OVER' window_name_or_specification
Referenced by:

window_function_type

rank_function_type ROW_NUMBER ( ) aggregate_function ntile_function lead_or_lag_function first_or_last_value_function nth_value_function
         ::= ( rank_function_type | 'ROW_NUMBER' ) '(' ')'
           | aggregate_function
           | ntile_function
           | lead_or_lag_function
           | first_or_last_value_function
           | nth_value_function

rank_function_type

RANK DENSE_RANK PERCENT_RANK CUME_DIST
         ::= 'RANK'
           | 'DENSE_RANK'
           | 'PERCENT_RANK'
           | 'CUME_DIST'

ntile_function

NTILE ( number_of_tiles )
         ::= 'NTILE' '(' number_of_tiles ')'
Referenced by:

number_of_tiles

value_expression ?
         ::= value_expression
           | '?'
Referenced by:

lead_or_lag_function

lead_or_lag ( value_expression , value_expression , value_expression ) null_treatment
         ::= lead_or_lag '(' value_expression ( ',' value_expression ( ',' value_expression )? )? ')' null_treatment?
Referenced by:

lead_or_lag

LEAD LAG
         ::= 'LEAD'
           | 'LAG'
Referenced by:

null_treatment

RESPECT IGNORE NULLS
         ::= ( 'RESPECT' | 'IGNORE' ) 'NULLS'

first_or_last_value_function

first_or_last_value ( value_expression ) null_treatment
         ::= first_or_last_value '(' value_expression ')' null_treatment?
Referenced by:

first_or_last_value

FIRST_VALUE LAST_VALUE
         ::= 'FIRST_VALUE'
           | 'LAST_VALUE'

nth_value_function

NTH_VALUE ( value_expression , nth_row ) from_first_or_last null_treatment
         ::= 'NTH_VALUE' '(' value_expression ',' nth_row ')' from_first_or_last? null_treatment?
Referenced by:

nth_row

simple_value_specification ?
           | '?'
Referenced by:

from_first_or_last

FROM FIRST LAST
         ::= 'FROM' ( 'FIRST' | 'LAST' )
Referenced by:

window_name_or_specification

in_line_window_specification identifier
         ::= in_line_window_specification
           | identifier
Referenced by:

in_line_window_specification

window_specification
         ::= window_specification

case_expression

case_abbreviation case_specification
         ::= case_abbreviation
           | case_specification

case_abbreviation

NULLIF ( value_expression , COALESCE ( value_expression , value_expression )
         ::= ( 'NULLIF' '(' value_expression ',' | 'COALESCE' '(' ( value_expression ',' )+ ) value_expression ')'
Referenced by:

case_specification

simple_case searched_case
         ::= simple_case
           | searched_case
Referenced by:

simple_case

CASE case_operand simple_when_clause else_clause END
         ::= 'CASE' case_operand simple_when_clause+ else_clause? 'END'
Referenced by:

searched_case

CASE searched_when_clause else_clause END
         ::= 'CASE' searched_when_clause+ else_clause? 'END'
Referenced by:

simple_when_clause

WHEN when_operand_list THEN result
         ::= 'WHEN' when_operand_list 'THEN' result
Referenced by:

searched_when_clause

WHEN search_condition THEN result
         ::= 'WHEN' search_condition 'THEN' result
Referenced by:

else_clause

ELSE result
         ::= 'ELSE' result
Referenced by:

case_operand

row_value_predicand overlaps_predicate_part_1
         ::= row_value_predicand
           | overlaps_predicate_part_1
Referenced by:

when_operand_list

when_operand ,
         ::= when_operand ( ',' when_operand )*
Referenced by:

when_operand

row_value_predicand comparison_predicate_part_2 between_predicate_part_2 in_predicate_part_2 character_like_predicate_part_2 octet_like_predicate_part_2 similar_predicate_part_2 regex_like_predicate_part_2 null_predicate_part_2 quantified_comparison_predicate_part_2 normalized_predicate_part_2 match_predicate_part_2 overlaps_predicate_part_2 distinct_predicate_part_2 member_predicate_part_2 submultiset_predicate_part_2 set_predicate_part_2 type_predicate_part_2
         ::= row_value_predicand
           | comparison_predicate_part_2
           | between_predicate_part_2
           | in_predicate_part_2
           | character_like_predicate_part_2
           | octet_like_predicate_part_2
           | similar_predicate_part_2
           | regex_like_predicate_part_2
           | null_predicate_part_2
           | normalized_predicate_part_2
           | match_predicate_part_2
           | overlaps_predicate_part_2
           | distinct_predicate_part_2
           | member_predicate_part_2
           | submultiset_predicate_part_2
           | set_predicate_part_2
           | type_predicate_part_2
Referenced by:

result

value_expression NULL
           | 'NULL'

cast_specification

CAST ( cast_operand AS cast_target ) try_cast
         ::= 'CAST' '(' cast_operand 'AS' cast_target ')'
           | try_cast

cast_operand

value_expression implicitly_typed_value_specification
         ::= value_expression
           | implicitly_typed_value_specification

cast_target

data_type schema_qualified_name
         ::= data_type
           | schema_qualified_name

next_value_expression

NEXT VALUE FOR schema_qualified_name
         ::= 'NEXT' 'VALUE' 'FOR' schema_qualified_name

field_reference

. identifier
         ::= '.' identifier
Referenced by:

subtype_treatment

TREAT ( value_expression AS target_subtype )
         ::= 'TREAT' '(' value_expression 'AS' target_subtype ')'

target_subtype

path_resolved_user_defined_type_name reference_type
           | reference_type
Referenced by:

method_invocation

direct_invocation udaf_filter generalized_invocation
         ::= direct_invocation udaf_filter?
           | generalized_invocation

direct_invocation

SQL_argument_list
         ::= SQL_argument_list
Referenced by:

generalized_invocation

. identifier SQL_argument_list
         ::= '.' identifier SQL_argument_list?
Referenced by:

static_method_invocation

:: identifier SQL_argument_list
         ::= '::' identifier SQL_argument_list?
Referenced by:

new_specification

NEW path_resolved_user_defined_type_name SQL_argument_list

new_invocation

method_invocation routine_invocation
         ::= method_invocation
           | routine_invocation
Not referenced by any.

attribute_or_method_reference

lambda_body
         ::= lambda_body
Referenced by:

dereference_operation

reference_value_expression -> identifier
         ::= reference_value_expression '->' identifier
Not referenced by any.

reference_resolution

DEREF ( reference_value_expression )
         ::= 'DEREF' '(' reference_value_expression ')'

array_element_reference

left_bracket_or_trigraph value_expression right_bracket_or_trigraph
Referenced by:

multiset_element_reference

ELEMENT ( multiset_value_expression )
         ::= 'ELEMENT' '(' multiset_value_expression ')'

value_expression

boolean_value_expression common_value_expression row_value_expression
         ::= boolean_value_expression
           | common_value_expression
           | row_value_expression

common_value_expression

numeric_value_expression string_value_expression datetime_value_expression interval_value_expression user_defined_type_value_expression reference_value_expression collection_value_expression
         ::= numeric_value_expression
           | string_value_expression
           | datetime_value_expression
           | interval_value_expression
           | user_defined_type_value_expression
           | reference_value_expression
           | collection_value_expression

user_defined_type_value_expression

value_expression_primary
         ::= value_expression_primary
Referenced by:

reference_value_expression

value_expression_primary
         ::= value_expression_primary

collection_value_expression

array_value_expression multiset_value_expression
         ::= array_value_expression
           | multiset_value_expression

numeric_value_expression

term + -
         ::= term ( ( '+' | '-' ) term )*

term

factor * / %
term     ::= factor ( ( '*' | '/' | '%' ) factor )*
Referenced by:

factor

+ - numeric_primary
factor   ::= ( '+' | '-' )? numeric_primary
Referenced by:

numeric_primary

numeric_value_function character_value_expression
         ::= numeric_value_function
           | character_value_expression
Referenced by:

numeric_value_function

position_expression regex_occurrences_function regex_position_expression extract_expression length_expression cardinality_expression max_cardinality_expression absolute_value_expression modulus_expression natural_logarithm exponential_function power_function square_root floor_function ceiling_function width_bucket_function
         ::= position_expression
           | regex_occurrences_function
           | regex_position_expression
           | extract_expression
           | length_expression
           | cardinality_expression
           | max_cardinality_expression
           | absolute_value_expression
           | modulus_expression
           | natural_logarithm
           | exponential_function
           | power_function
           | square_root
           | floor_function
           | ceiling_function
           | width_bucket_function
Referenced by:

position_expression

character_position_expression binary_position_expression
         ::= character_position_expression
           | binary_position_expression
Referenced by:

regex_occurrences_function

OCCURRENCES_REGEX ( character_value_expression FLAG character_value_expression IN character_value_expression FROM numeric_value_expression USING char_length_units )
         ::= 'OCCURRENCES_REGEX' '(' character_value_expression ( 'FLAG' character_value_expression )? 'IN' character_value_expression ( 'FROM' numeric_value_expression )? ( 'USING' char_length_units )? ')'
Referenced by:

regex_position_expression

POSITION_REGEX ( regex_position_start_or_after character_value_expression FLAG character_value_expression IN character_value_expression FROM numeric_value_expression USING char_length_units OCCURRENCE numeric_value_expression GROUP numeric_value_expression )
Referenced by:

regex_position_start_or_after

START AFTER
         ::= 'START'
           | 'AFTER'

character_position_expression

POSITION ( character_value_expression IN character_value_expression USING char_length_units )
         ::= 'POSITION' '(' character_value_expression 'IN' character_value_expression ( 'USING' char_length_units )? ')'
Referenced by:

binary_position_expression

POSITION ( binary_value_expression IN binary_value_expression )
         ::= 'POSITION' '(' binary_value_expression 'IN' binary_value_expression ')'
Referenced by:

length_expression

char_length_expression octet_length_expression
         ::= char_length_expression
           | octet_length_expression
Referenced by:

char_length_expression

CHAR_LENGTH CHARACTER_LENGTH ( character_value_expression USING char_length_units )
         ::= ( 'CHAR_LENGTH' | 'CHARACTER_LENGTH' ) '(' character_value_expression ( 'USING' char_length_units )? ')'
Referenced by:

octet_length_expression

OCTET_LENGTH ( string_value_expression )
         ::= 'OCTET_LENGTH' '(' string_value_expression ')'
Referenced by:

extract_expression

EXTRACT ( extract_field FROM extract_source )
         ::= 'EXTRACT' '(' extract_field 'FROM' extract_source ')'
Referenced by:

extract_field

primary_datetime_field time_zone_field
         ::= primary_datetime_field
           | time_zone_field
Referenced by:

time_zone_field

TIMEZONE_HOUR TIMEZONE_MINUTE
         ::= 'TIMEZONE_HOUR'
           | 'TIMEZONE_MINUTE'
Referenced by:

extract_source

datetime_value_expression interval_value_expression
         ::= datetime_value_expression
           | interval_value_expression
Referenced by:

cardinality_expression

CARDINALITY ( collection_value_expression )
         ::= 'CARDINALITY' '(' collection_value_expression ')'
Referenced by:

max_cardinality_expression

MAX_CARDINALITY ( array_value_expression )
         ::= 'MAX_CARDINALITY' '(' array_value_expression ')'
Referenced by:

absolute_value_expression

ABS ( numeric_value_expression )
         ::= 'ABS' '(' numeric_value_expression ')'
Referenced by:

modulus_expression

MOD ( numeric_value_expression , numeric_value_expression )
         ::= 'MOD' '(' numeric_value_expression ',' numeric_value_expression ')'
Referenced by:

natural_logarithm

LN ( numeric_value_expression )
         ::= 'LN' '(' numeric_value_expression ')'
Referenced by:

exponential_function

EXP ( numeric_value_expression )
         ::= 'EXP' '(' numeric_value_expression ')'
Referenced by:

power_function

POWER ( numeric_value_expression , numeric_value_expression )
         ::= 'POWER' '(' numeric_value_expression ',' numeric_value_expression ')'
Referenced by:

square_root

SQRT ( numeric_value_expression )
         ::= 'SQRT' '(' numeric_value_expression ')'
Referenced by:

floor_function

FLOOR ( numeric_value_expression )
         ::= 'FLOOR' '(' numeric_value_expression ')'
Referenced by:

ceiling_function

CEIL CEILING ( numeric_value_expression )
         ::= ( 'CEIL' | 'CEILING' ) '(' numeric_value_expression ')'
Referenced by:

width_bucket_function

WIDTH_BUCKET ( numeric_value_expression , numeric_value_expression , numeric_value_expression , numeric_value_expression )
         ::= 'WIDTH_BUCKET' '(' numeric_value_expression ',' numeric_value_expression ( ',' numeric_value_expression ',' numeric_value_expression )? ')'
Referenced by:

string_value_expression

character_value_expression binary_value_expression
         ::= character_value_expression
           | binary_value_expression

character_value_expression

character_factor concatenation
         ::= character_factor concatenation*

concatenation

|| character_factor
         ::= '||' character_factor

character_factor

character_primary collate_clause
         ::= character_primary collate_clause?

character_primary

string_value_function binary_value_expression
         ::= string_value_function
           | binary_value_expression
Referenced by:

binary_value_expression

binary_primary binary_concatenation
         ::= binary_primary binary_concatenation*

binary_primary

string_value_function datetime_value_expression
         ::= string_value_function
           | datetime_value_expression

binary_concatenation

|| binary_primary
         ::= '||' binary_primary
Referenced by:

string_value_function

character_value_function binary_value_function
         ::= character_value_function
           | binary_value_function

character_value_function

character_substring_function regular_expression_substring_function regex_substring_function fold transcoding character_transliteration regex_transliteration trim_function character_overlay_function normalize_function specific_type_method
         ::= character_substring_function
           | regex_substring_function
           | fold
           | transcoding
           | character_transliteration
           | regex_transliteration
           | trim_function
           | character_overlay_function
           | normalize_function
           | specific_type_method
Referenced by:

character_substring_function

SUBSTRING ( character_value_expression FROM numeric_value_expression FOR numeric_value_expression USING char_length_units )
         ::= 'SUBSTRING' '(' character_value_expression 'FROM' numeric_value_expression ( 'FOR' numeric_value_expression )? ( 'USING' char_length_units )? ')'
Referenced by:

regular_expression_substring_function

SUBSTRING ( character_value_expression SIMILAR character_value_expression ESCAPE character_value_expression )
         ::= 'SUBSTRING' '(' character_value_expression 'SIMILAR' character_value_expression 'ESCAPE' character_value_expression ')'
Referenced by:

regex_substring_function

SUBSTRING_REGEX ( character_value_expression FLAG character_value_expression IN character_value_expression FROM numeric_value_expression USING char_length_units OCCURRENCE numeric_value_expression GROUP numeric_value_expression )
         ::= 'SUBSTRING_REGEX' '(' character_value_expression ( 'FLAG' character_value_expression )? 'IN' character_value_expression ( 'FROM' numeric_value_expression )? ( 'USING' char_length_units )? ( 'OCCURRENCE' numeric_value_expression )? ( 'GROUP' numeric_value_expression )? ')'
Referenced by:

fold

UPPER LOWER ( character_value_expression )
fold     ::= ( 'UPPER' | 'LOWER' ) '(' character_value_expression ')'
Referenced by:

transcoding

CONVERT ( character_value_expression USING schema_qualified_name )
         ::= 'CONVERT' '(' character_value_expression 'USING' schema_qualified_name ')'
Referenced by:

character_transliteration

TRANSLATE ( character_value_expression USING schema_qualified_name )
         ::= 'TRANSLATE' '(' character_value_expression 'USING' schema_qualified_name ')'
Referenced by:

regex_transliteration

TRANSLATE_REGEX ( character_value_expression FLAG character_value_expression IN character_value_expression WITH character_value_expression FROM numeric_value_expression USING char_length_units OCCURRENCE regex_transliteration_occurrence )
         ::= 'TRANSLATE_REGEX' '(' character_value_expression ( 'FLAG' character_value_expression )? 'IN' character_value_expression ( 'WITH' character_value_expression )? ( 'FROM' numeric_value_expression )? ( 'USING' char_length_units )? ( 'OCCURRENCE' regex_transliteration_occurrence )? ')'
Referenced by:

regex_transliteration_occurrence

ALL numeric_value_expression
         ::= 'ALL'
           | numeric_value_expression
Referenced by:

trim_function

TRIM ( trim_operands )
         ::= 'TRIM' '(' trim_operands ')'
Referenced by:

trim_operands

trim_specification character_value_expression , FROM character_value_expression
         ::= trim_specification? character_value_expression ( ( ',' | 'FROM' ) character_value_expression )?
Referenced by:

trim_specification

LEADING TRAILING BOTH
         ::= 'LEADING'
           | 'TRAILING'
           | 'BOTH'

character_overlay_function

OVERLAY ( character_value_expression PLACING character_value_expression FROM numeric_value_expression FOR numeric_value_expression USING char_length_units )
         ::= 'OVERLAY' '(' character_value_expression 'PLACING' character_value_expression 'FROM' numeric_value_expression ( 'FOR' numeric_value_expression )? ( 'USING' char_length_units )? ')'
Referenced by:

normalize_function

NORMALIZE ( character_value_expression , normal_form , normalize_function_result_length )
         ::= 'NORMALIZE' '(' character_value_expression ( ',' normal_form ( ',' normalize_function_result_length )? )? ')'
Referenced by:

normal_form

NFC NFD NFKC NFKD
         ::= 'NFC'
           | 'NFD'
           | 'NFKC'
           | 'NFKD'

normalize_function_result_length

character_length character_large_object_length
         ::= character_length
           | character_large_object_length
Referenced by:

specific_type_method

. SPECIFICTYPE ( )
         ::= '.' 'SPECIFICTYPE' ( '(' ')' )?
Referenced by:

binary_value_function

binary_substring_function binary_trim_function binary_overlay_function
         ::= binary_substring_function
           | binary_trim_function
           | binary_overlay_function
Referenced by:

binary_substring_function

SUBSTRING ( binary_value_expression FROM numeric_value_expression FOR numeric_value_expression )
         ::= 'SUBSTRING' '(' binary_value_expression 'FROM' numeric_value_expression ( 'FOR' numeric_value_expression )? ')'
Referenced by:

binary_trim_function

TRIM ( binary_trim_operands )
         ::= 'TRIM' '(' binary_trim_operands ')'
Referenced by:

binary_trim_operands

trim_specification binary_value_expression , FROM binary_value_expression
         ::= trim_specification? binary_value_expression ( ( ',' | 'FROM' ) binary_value_expression )?
Referenced by:

binary_overlay_function

OVERLAY ( binary_value_expression PLACING binary_value_expression FROM numeric_value_expression FOR numeric_value_expression )
         ::= 'OVERLAY' '(' binary_value_expression 'PLACING' binary_value_expression 'FROM' numeric_value_expression ( 'FOR' numeric_value_expression )? ')'
Referenced by:

datetime_value_expression

datetime_term interval_value_expression
         ::= datetime_term
           | interval_value_expression

datetime_term

datetime_factor
         ::= datetime_factor

datetime_factor

datetime_primary time_zone
         ::= datetime_primary time_zone?
Referenced by:

datetime_primary

datetime_value_function interval_value_expression
         ::= datetime_value_function
           | interval_value_expression
Referenced by:

time_zone

AT time_zone_specifier
         ::= 'AT' time_zone_specifier
Referenced by:

time_zone_specifier

LOCAL TIME ZONE interval_primary
         ::= 'LOCAL'
           | 'TIME' 'ZONE' interval_primary
Referenced by:

datetime_value_function

CURRENT_DATE current_time_value_function current_timestamp_value_function current_local_time_value_function current_local_timestamp_value_function
         ::= 'CURRENT_DATE'
           | current_time_value_function
           | current_timestamp_value_function
           | current_local_time_value_function

current_time_value_function

CURRENT_TIME ( unsigned_integer )
         ::= 'CURRENT_TIME' ( '(' unsigned_integer ')' )?
Referenced by:

current_local_time_value_function

LOCALTIME ( unsigned_integer )
         ::= 'LOCALTIME' ( '(' unsigned_integer ')' )?
Referenced by:

current_timestamp_value_function

CURRENT_TIMESTAMP ( unsigned_integer )
         ::= 'CURRENT_TIMESTAMP' ( '(' unsigned_integer ')' )?
Referenced by:

current_local_timestamp_value_function

LOCALTIMESTAMP ( unsigned_integer )
         ::= 'LOCALTIMESTAMP' ( '(' unsigned_integer ')' )?
Referenced by:

interval_value_expression

interval_term ( datetime_value_expression - datetime_term ) interval_qualifier
         ::= interval_term
           | '(' datetime_value_expression '-' datetime_term ')' interval_qualifier

interval_term

interval_factor * / factor
         ::= interval_factor ( ( '*' | '/' ) factor )?

interval_factor

+ - interval_primary
         ::= ( '+' | '-' )? interval_primary
Referenced by:

interval_primary

interval_value_function array_value_expression interval_qualifier
         ::= interval_value_function

interval_value_function

interval_absolute_value_function
         ::= interval_absolute_value_function
Referenced by:

interval_absolute_value_function

ABS ( interval_value_expression )
         ::= 'ABS' '(' interval_value_expression ')'
Referenced by:

boolean_value_expression

boolean_term OR
         ::= boolean_term ( 'OR' boolean_term )*

boolean_term

boolean_factor AND
         ::= boolean_factor ( 'AND' boolean_factor )*
Referenced by:

boolean_factor

NOT boolean_test
         ::= 'NOT'? boolean_test
Referenced by:

boolean_test

boolean_primary IS NOT truth_value
         ::= boolean_primary ( 'IS' 'NOT'? truth_value )?
Referenced by:

truth_value

TRUE FALSE UNKNOWN
         ::= 'TRUE'
           | 'FALSE'
           | 'UNKNOWN'
Referenced by:

boolean_primary

predicate boolean_predicand
         ::= predicate
           | boolean_predicand
Referenced by:

boolean_predicand

parenthesized_boolean_value_expression numeric_value_expression
           | numeric_value_expression
Referenced by:

parenthesized_boolean_value_expression

( boolean_value_expression )
         ::= '(' boolean_value_expression ')'
Referenced by:

array_value_expression

array_primary ||
         ::= array_primary ( '||' array_primary )*

array_value_expression_1

array_value_expression
         ::= array_value_expression
Not referenced by any.

array_primary

array_value_function multiset_value_expression
         ::= array_value_function
           | multiset_value_expression
Referenced by:

array_value_function

trim_array_function
         ::= trim_array_function
Referenced by:

trim_array_function

TRIM_ARRAY ( array_value_expression , numeric_value_expression )
         ::= 'TRIM_ARRAY' '(' array_value_expression ',' numeric_value_expression ')'
Referenced by:

array_value_constructor

array_value_constructor_by_enumeration array_value_constructor_by_query
           | array_value_constructor_by_query

array_value_constructor_by_enumeration

ARRAY left_bracket_or_trigraph array_element_list right_bracket_or_trigraph
Referenced by:

array_element_list

array_element ,
         ::= array_element ( ',' array_element )*

array_element

value_expression
         ::= value_expression
Referenced by:

array_value_constructor_by_query

ARRAY subquery
         ::= 'ARRAY' subquery
Referenced by:

multiset_value_expression

multiset_term MULTISET UNION EXCEPT ALL DISTINCT multiset_term
         ::= multiset_term ( 'MULTISET' ( 'UNION' | 'EXCEPT' ) ( 'ALL' | 'DISTINCT' )? multiset_term )?

multiset_term

multiset_primary MULTISET INTERSECT ALL DISTINCT multiset_primary
         ::= multiset_primary ( 'MULTISET' 'INTERSECT' ( 'ALL' | 'DISTINCT' )? multiset_primary )?

multiset_primary

multiset_set_function value_expression_primary
         ::= multiset_set_function
           | value_expression_primary
Referenced by:

multiset_set_function

SET ( multiset_value_expression )
         ::= 'SET' '(' multiset_value_expression ')'
Referenced by:

multiset_value_constructor

multiset_value_constructor_by_enumeration multiset_value_constructor_by_query table_value_constructor_by_query
           | multiset_value_constructor_by_query
           | table_value_constructor_by_query

multiset_value_constructor_by_enumeration

MULTISET left_bracket_or_trigraph multiset_element_list right_bracket_or_trigraph

multiset_element_list

multiset_element ,
         ::= multiset_element ( ',' multiset_element )*

multiset_element

value_expression
         ::= value_expression
Referenced by:

multiset_value_constructor_by_query

MULTISET subquery
         ::= 'MULTISET' subquery

table_value_constructor_by_query

TABLE subquery
         ::= 'TABLE' subquery

row_value_constructor

explicit_row_value_constructor common_value_expression boolean_value_expression
         ::= explicit_row_value_constructor
           | common_value_expression
           | boolean_value_expression

explicit_row_value_constructor

ROW ( row_value_constructor_element_list ( row_value_constructor_element , row_value_constructor_element_list ) subquery
           | subquery

row_value_constructor_element_list

row_value_constructor_element ,

row_value_constructor_element

value_expression
         ::= value_expression

contextually_typed_row_value_constructor

common_value_expression boolean_value_expression contextually_typed_value_specification ( contextually_typed_value_specification contextually_typed_row_value_constructor_element , contextually_typed_row_value_constructor_element_list ROW ( contextually_typed_row_value_constructor_element_list )
         ::= common_value_expression
           | boolean_value_expression

contextually_typed_row_value_constructor_element_list

contextually_typed_row_value_constructor_element ,

contextually_typed_row_value_constructor_element

contextually_typed_value_specification

row_value_constructor_predicand

common_value_expression explicit_row_value_constructor
         ::= common_value_expression
           | explicit_row_value_constructor
Referenced by:

row_value_expression

explicit_row_value_constructor row_value_special_case
         ::= explicit_row_value_constructor
           | row_value_special_case

table_row_value_expression

row_value_constructor row_value_special_case
         ::= row_value_constructor
           | row_value_special_case

contextually_typed_row_value_expression

contextually_typed_row_value_constructor row_value_special_case
           | row_value_special_case

row_value_predicand

row_value_constructor_predicand row_value_special_case
         ::= row_value_constructor_predicand
           | row_value_special_case

row_value_special_case

common_value_expression nonparenthesized_value_expression_primary
         ::= common_value_expression

table_value_constructor

VALUES row_value_expression_list
         ::= 'VALUES' row_value_expression_list
Referenced by:

row_value_expression_list

table_row_value_expression ,
Referenced by:

contextually_typed_table_value_constructor

VALUES contextually_typed_row_value_expression_list
         ::= 'VALUES' contextually_typed_row_value_expression_list
Referenced by:

contextually_typed_row_value_expression_list

contextually_typed_row_value_expression ,

table_expression

from_clause where_clause group_by_clause having_clause window_clause

from_clause

FROM table_reference_list
         ::= 'FROM' table_reference_list
Referenced by:

table_reference_list

table_reference ,
         ::= table_reference ( ',' table_reference )*
Referenced by:

table_reference

table_factor joined_table
         ::= table_factor joined_table*

table_factor

table_primary sample_clause partitioned_join_table

sample_clause

TABLESAMPLE sample_method ( sample_percentage ) repeatable_clause
         ::= 'TABLESAMPLE' sample_method '(' sample_percentage ')' repeatable_clause?
Referenced by:

sample_method

BERNOULLI SYSTEM
         ::= 'BERNOULLI'
           | 'SYSTEM'
Referenced by:

repeatable_clause

REPEATABLE ( repeat_argument )
         ::= 'REPEATABLE' '(' repeat_argument ')'
Referenced by:

sample_percentage

numeric_value_expression
         ::= numeric_value_expression
Referenced by:

repeat_argument

numeric_value_expression
         ::= numeric_value_expression
Referenced by:

table_primary

table_or_query_name derived_table parenthesized_joined_table lateral_derived_table collection_derived_table table_function_derived_table only_spec data_change_delta_table alias

alias

AS identifier identifier_suffix_chain ( column_name_list )
Referenced by:

system_version_specification

AS OF SYSTEM TIME VERSIONS BEFORE AFTER SYSTEM TIME BETWEEN ASYMMETRIC SYMMETRIC SYSTEM TIME datetime_value_expression AND datetime_value_expression
         ::= ( 'AS' 'OF' 'SYSTEM' 'TIME' | 'VERSIONS' ( ( 'BEFORE' | 'AFTER' ) 'SYSTEM' 'TIME' | 'BETWEEN' ( 'ASYMMETRIC' | 'SYMMETRIC' )? 'SYSTEM' 'TIME' datetime_value_expression 'AND' ) ) datetime_value_expression
Not referenced by any.

only_spec

ONLY ( table_or_query_name )
         ::= 'ONLY' '(' table_or_query_name ')'
Referenced by:

lateral_derived_table

LATERAL subquery
         ::= 'LATERAL' subquery
Referenced by:

collection_derived_table

UNNEST ( collection_value_expression , ) WITH ORDINALITY
         ::= 'UNNEST' '(' collection_value_expression ( ',' collection_value_expression )* ')' ( 'WITH' 'ORDINALITY' )?
Referenced by:

table_function_derived_table

TABLE ( collection_value_expression )
         ::= 'TABLE' '(' collection_value_expression ')'
Referenced by:

derived_table

query_expression subquery
         ::= query_expression
           | subquery
Referenced by:

table_or_query_name

table_name identifier
         ::= table_name
           | identifier

column_name_list

identifier ,
         ::= identifier ( ',' identifier )*

data_change_delta_table

result_option TABLE ( data_change_statement )
         ::= result_option 'TABLE' '(' data_change_statement ')'
Referenced by:

data_change_statement

delete_statement_searched insert_statement merge_statement update_statement_searched
         ::= delete_statement_searched
           | insert_statement
           | merge_statement
           | update_statement_searched
Referenced by:

result_option

FINAL NEW OLD
         ::= 'FINAL'
           | 'NEW'
           | 'OLD'
Referenced by:

parenthesized_joined_table

( table_primary table_reference joined_table )
         ::= '(' ( table_primary | table_reference ) joined_table* ')'
Referenced by:

joined_table

cross_join qualified_join natural_join
         ::= cross_join
           | qualified_join
           | natural_join

cross_join

CROSS JOIN table_factor
         ::= 'CROSS' 'JOIN' table_factor
Referenced by:

qualified_join

join_type JOIN table_reference partitioned_join_table join_specification
Referenced by:

partitioned_join_table

PARTITION BY partitioned_join_column_reference_list
         ::= 'PARTITION' 'BY' partitioned_join_column_reference_list

partitioned_join_column_reference_list

( partitioned_join_column_reference , )
Referenced by:

partitioned_join_column_reference

column_reference
         ::= column_reference

natural_join

NATURAL join_type JOIN table_factor partitioned_join_table
         ::= 'NATURAL' join_type? 'JOIN' ( table_factor | partitioned_join_table )
Referenced by:

join_specification

join_condition named_columns_join
         ::= join_condition
           | named_columns_join
Referenced by:

join_condition

ON search_condition
         ::= 'ON' search_condition
Referenced by:

named_columns_join

USING ( join_column_list )
         ::= 'USING' '(' join_column_list ')'
Referenced by:

join_type

INNER outer_join_type OUTER
         ::= 'INNER'
           | outer_join_type 'OUTER'?

outer_join_type

LEFT RIGHT FULL
         ::= 'LEFT'
           | 'RIGHT'
           | 'FULL'
Referenced by:

join_column_list

column_name_list
         ::= column_name_list
Referenced by:

where_clause

WHERE search_condition
         ::= 'WHERE' search_condition
Referenced by:

group_by_clause

GROUP BY set_quantifier grouping_element_list
         ::= 'GROUP' 'BY' set_quantifier? grouping_element_list
Referenced by:

grouping_element_list

grouping_element ,
         ::= grouping_element ( ',' grouping_element )*
Referenced by:

grouping_element

rollup_list cube_list grouping_sets_specification empty_grouping_set ordinary_grouping_set
         ::= rollup_list
           | cube_list
           | grouping_sets_specification
           | empty_grouping_set
           | ordinary_grouping_set
Referenced by:

ordinary_grouping_set

grouping_column_reference ( grouping_column_reference_list )
         ::= grouping_column_reference
           | '(' grouping_column_reference_list ')'

grouping_column_reference

grouping_expression column_reference collate_clause

grouping_column_reference_list

grouping_column_reference ,
Referenced by:

rollup_list

ROLLUP ( ordinary_grouping_set_list )
         ::= 'ROLLUP' '(' ordinary_grouping_set_list ')'

ordinary_grouping_set_list

ordinary_grouping_set ,
         ::= ordinary_grouping_set ( ',' ordinary_grouping_set )*
Referenced by:

cube_list

CUBE ( ordinary_grouping_set_list )
         ::= 'CUBE' '(' ordinary_grouping_set_list ')'

grouping_sets_specification

GROUPING SETS ( grouping_set_list )
         ::= 'GROUPING' 'SETS' '(' grouping_set_list ')'

grouping_set_list

grouping_set ,
         ::= grouping_set ( ',' grouping_set )*

grouping_set

rollup_list cube_list grouping_sets_specification empty_grouping_set ordinary_grouping_set
         ::= rollup_list
           | cube_list
           | grouping_sets_specification
           | empty_grouping_set
           | ordinary_grouping_set
Referenced by:

empty_grouping_set

( )
         ::= '(' ')'

having_clause

HAVING search_condition
         ::= 'HAVING' search_condition
Referenced by:

window_clause

WINDOW window_definition_list
         ::= 'WINDOW' window_definition_list
Referenced by:

window_definition_list

window_definition ,
         ::= window_definition ( ',' window_definition )*
Referenced by:

window_definition

identifier AS window_specification
         ::= identifier 'AS' window_specification
Referenced by:

window_specification

( window_specification_details )
         ::= '(' window_specification_details? ')'

window_specification_details

window_partition_clause window_order_clause window_frame_clause existing_identifier
Referenced by:

existing_identifier

identifier
         ::= identifier

window_partition_clause

PARTITION BY window_partition_column_reference_list
         ::= 'PARTITION' 'BY' window_partition_column_reference_list

window_partition_column_reference_list

window_partition_column_reference ,
Referenced by:

window_partition_column_reference

value_expression column_reference collate_clause
         ::= ( value_expression | column_reference ) collate_clause?

window_order_clause

ORDER BY sort_specification_list
         ::= 'ORDER' 'BY' sort_specification_list

window_frame_clause

window_frame_units window_frame_extent window_frame_exclusion

window_frame_units

ROWS RANGE
         ::= 'ROWS'
           | 'RANGE'
Referenced by:

window_frame_extent

window_frame_start window_frame_between
         ::= window_frame_start
           | window_frame_between
Referenced by:

window_frame_start

UNBOUNDED PRECEDING CURRENT ROW window_frame_preceding
         ::= 'UNBOUNDED' 'PRECEDING'
           | 'CURRENT' 'ROW'
           | window_frame_preceding

window_frame_preceding

value_expression PRECEDING
         ::= value_expression 'PRECEDING'
Referenced by:

window_frame_between

BETWEEN window_frame_bound AND window_frame_bound
         ::= 'BETWEEN' window_frame_bound 'AND' window_frame_bound
Referenced by:

window_frame_bound

window_frame_start UNBOUNDED FOLLOWING window_frame_following
         ::= window_frame_start
           | 'UNBOUNDED' 'FOLLOWING'
           | window_frame_following
Referenced by:

window_frame_following

value_expression FOLLOWING
         ::= value_expression 'FOLLOWING'
Referenced by:

window_frame_exclusion

EXCLUDE CURRENT ROW GROUP TIES NO OTHERS
         ::= 'EXCLUDE' ( 'CURRENT' 'ROW' | 'GROUP' | 'TIES' | 'NO' 'OTHERS' )
Referenced by:

query_specification

SELECT set_quantifier select_list table_expression
         ::= 'SELECT' set_quantifier? select_list table_expression?

select_list

* select_sublist , , * , select_sublist
         ::= ( '*' | select_sublist ( ',' select_sublist )* ( ',' '*' )? ) ( ',' select_sublist )*

select_sublist

derived_column . * AS ( all_fields_column_name_list ) as_clause
         ::= derived_column ( '.' '*' ( 'AS' '(' all_fields_column_name_list ')' )? | as_clause )?
Referenced by:

qualified_asterisk

asterisked_identifier_chain . * all_fields_reference
         ::= asterisked_identifier_chain '.' '*'
           | all_fields_reference
Not referenced by any.

asterisked_identifier_chain

identifier .
         ::= identifier ( '.' identifier )*
Referenced by:

derived_column

value_expression as_clause
         ::= value_expression as_clause?
Referenced by:

as_clause

AS identifier
         ::= 'AS'? identifier

all_fields_reference

value_expression_primary . * AS ( all_fields_column_name_list )
         ::= value_expression_primary '.' '*' ( 'AS' '(' all_fields_column_name_list ')' )?
Referenced by:

all_fields_column_name_list

column_name_list
         ::= column_name_list

query_expression

with_clause query_expression_body order_by_clause result_offset_clause fetch_first_clause limit_clause

with_clause

WITH RECURSIVE with_list
         ::= 'WITH' 'RECURSIVE'? with_list
Referenced by:

with_list

with_list_element ,
         ::= with_list_element ( ',' with_list_element )*
Referenced by:

with_list_element

identifier ( column_name_list ) AS subquery search_or_cycle_clause
         ::= identifier ( '(' column_name_list ')' )? 'AS' subquery search_or_cycle_clause?
Referenced by:

query_expression_body

query_term corresponding_spec ALL DISTINCT UNION EXCEPT
         ::= query_term ( ( 'UNION' | 'EXCEPT' ) ( 'ALL' | 'DISTINCT' )? corresponding_spec? query_term )*

query_term

query_primary corresponding_spec ALL DISTINCT INTERSECT
         ::= query_primary ( 'INTERSECT' ( 'ALL' | 'DISTINCT' )? corresponding_spec? query_primary )*
Referenced by:

query_primary

( query_expression_body order_by_clause limit_clause result_offset_clause fetch_first_clause ) simple_table
           | simple_table
Referenced by:

simple_table

table_value_constructor explicit_table query_specification
         ::= table_value_constructor
           | explicit_table
           | query_specification
Referenced by:

explicit_table

TABLE table_or_query_name
         ::= 'TABLE' table_or_query_name
Referenced by:

corresponding_spec

CORRESPONDING BY ( column_name_list )
         ::= 'CORRESPONDING' ( 'BY' '(' column_name_list ')' )?

order_by_clause

ORDER BY sort_specification_list
         ::= 'ORDER' 'BY' sort_specification_list

result_offset_clause

OFFSET simple_value_specification ROW ROWS
         ::= 'OFFSET' simple_value_specification ( 'ROW' | 'ROWS' )

fetch_first_clause

FETCH FIRST NEXT simple_value_specification ROW ROWS ONLY
         ::= 'FETCH' ( 'FIRST' | 'NEXT' ) simple_value_specification? ( 'ROW' | 'ROWS' ) 'ONLY'

search_or_cycle_clause

search_clause cycle_clause cycle_clause
         ::= search_clause cycle_clause?
           | cycle_clause
Referenced by:

search_clause

SEARCH recursive_search_order SET identifier
         ::= 'SEARCH' recursive_search_order 'SET' identifier
Referenced by:

recursive_search_order

DEPTH BREADTH FIRST BY column_name_list
         ::= ( 'DEPTH' | 'BREADTH' ) 'FIRST' 'BY' column_name_list
Referenced by:

cycle_clause

CYCLE cycle_column_list SET identifier TO value_expression DEFAULT value_expression USING identifier
         ::= 'CYCLE' cycle_column_list 'SET' identifier 'TO' value_expression 'DEFAULT' value_expression 'USING' identifier
Referenced by:

cycle_column_list

identifier ,
         ::= identifier ( ',' identifier )*
Referenced by:

subquery

( query_expression )

predicate

exists_predicate unique_predicate row_value_predicand comparison_predicate between_predicate in_predicate like_predicate similar_predicate regex_like_predicate null_predicate quantified_comparison_predicate normalized_predicate match_predicate overlaps_predicate distinct_predicate member_predicate submultiset_predicate set_predicate type_predicate
         ::= exists_predicate
           | unique_predicate
Referenced by:

comparison_predicate