ADQL 2.1

The SELECT statement is found at <query_specification>.

 
Cross-Reference: rules
Cross-Reference: keywords

<ADQL_language_character>    ::=
     <simple_Latin_letter>
     | <digit>
     | <SQL_special_character>

<ADQL_reserved_word>    ::=
     ABS
     | ACOS
     | AREA
     | ASIN
     | ATAN
     | ATAN2
     | BIGINT
     | BOX
     | CEILING
     | CENTROID
     | CIRCLE
     | CONTAINS
     | COORD1
     | COORD2
     | COORDSYS
     | COS
     | COT
     | DEGREES
     | DISTANCE
     | EXP
     | FLOOR
     | ILIKE
     | INTERSECTS
     | IN_UNIT
     | LOG
     | LOG10
     | MOD
     | OFFSET
     | PI
     | POINT
     | POLYGON
     | POWER
     | RADIANS
     | REGION
     | RAND
     | ROUND
     | SIN
     | SQRT
     | TOP
     | TAN
     | TRUNCATE

<SQL_embedded_language_character>    ::=
     <left_bracket> | <right_bracket>

<SQL_reserved_word>    ::=
     ABSOLUTE | ACTION | ADD | ALL
     | ALLOCATE | ALTER | AND
     | ANY | ARE
     | AS | ASC
     | ASSERTION | AT
     | AUTHORIZATION | AVG
     | BEGIN | BETWEEN | BIT | BIT_LENGTH
     | BOTH | BY
     | CASCADE | CASCADED | CASE | CAST
     | CATALOG
     | CHAR | CHARACTER | CHAR_LENGTH
     | CHARACTER_LENGTH | CHECK | CLOSE
     | COALESCE | COLLATE | COLLATION
     | COLUMN | COMMIT
     | CONNECT
     | CONNECTION | CONSTRAINT
     | CONSTRAINTS | CONTINUE
     | CONVERT | CORRESPONDING | COUNT | CREATE | CROSS
     | CURRENT
     | CURRENT_DATE | CURRENT_TIME
     | CURRENT_TIMESTAMP | CURRENT_USER | CURSOR
     | DATE | DAY | DEALLOCATE
     | DECIMAL | DECLARE | DEFAULT | DEFERRABLE
     | DEFERRED | DELETE | DESC | DESCRIBE | DESCRIPTOR
     | DIAGNOSTICS
     | DISCONNECT | DISTINCT | DOMAIN | DOUBLE | DROP
     | ELSE | END | END-EXEC | ESCAPE
     | EXCEPT | EXCEPTION
     | EXEC | EXECUTE | EXISTS
     | EXTERNAL | EXTRACT
     | FALSE | FETCH | FIRST | FLOAT | FOR
     | FOREIGN | FOUND | FROM | FULL
     | GET | GLOBAL | GO | GOTO
     | GRANT | GROUP
     | HAVING | HOUR
     | IDENTITY | IMMEDIATE | IN | INDICATOR
     | INITIALLY | INNER | INPUT
     | INSENSITIVE | INSERT | INT | INTEGER | INTERSECT
     | INTERVAL | INTO | IS
     | ISOLATION
     | JOIN
     | KEY
     | LANGUAGE | LAST | LEADING | LEFT
     | LEVEL | LIKE | LOCAL | LOWER
     | MATCH | MAX | MIN | MINUTE | MODULE
     | MONTH
     | NAMES | NATIONAL | NATURAL | NCHAR | NEXT | NO
     | NOT | NULL
     | NULLIF | NUMERIC
     | OCTET_LENGTH | OF
     | ON | ONLY | OPEN | OPTION | OR
     | ORDER | OUTER
     | OUTPUT | OVERLAPS
     | PAD | PARTIAL | POSITION | PRECISION | PREPARE
     | PRESERVE | PRIMARY
     | PRIOR | PRIVILEGES | PROCEDURE | PUBLIC
     | READ | REAL | REFERENCES | RELATIVE | RESTRICT
     | REVOKE | RIGHT
     | ROLLBACK | ROWS
     | SCHEMA | SCROLL | SECOND | SECTION
     | SELECT
     | SESSION | SESSION_USER | SET
     | SIZE | SMALLINT | SOME | SPACE | SQL | SQLCODE
     | SQLERROR | SQLSTATE
     | SUBSTRING | SUM | SYSTEM_USER
     | TABLE | TEMPORARY
     | THEN | TIME | TIMESTAMP
     | TIMEZONE_HOUR | TIMEZONE_MINUTE
     | TO | TRAILING | TRANSACTION
     | TRANSLATE | TRANSLATION | TRIM | TRUE
     | UNION | UNIQUE | UNKNOWN | UPDATE | UPPER | USAGE
     | USER | USING
     | VALUE | VALUES | VARCHAR | VARYING | VIEW
     | WHEN | WHENEVER | WHERE | WITH | WORK | WRITE
     | YEAR
     | ZONE

<SQL_special_character>    ::=
     <space>
     | <double_quote>
     | <percent>
     | <ampersand>
     | <quote>
     | <left_paren>
     | <right_paren>
     | <asterisk>
     | <plus_sign>
     | <comma>
     | <minus_sign>
     | <period>
     | <solidus>
     | <colon>
     | <semicolon>
     | <less_than_operator>
     | <equals_operator>
     | <greater_than_operator>
     | <question_mark>
     | <underscore>
     | <vertical_bar>

<ampersand>    ::=   &

<approximate_numeric_literal>    ::=   <mantissa> E <exponent>

<approximate numeric type>    ::=
     REAL
     | DOUBLE PRECISION

<area>    ::=   AREA <left_paren> <geometry_value_expression> <right_paren>

<as_clause>    ::=   [ AS ] <column_name>

<asterisk>    ::=   *

<between_predicate>    ::=
     <value_expression> [ NOT ] BETWEEN
     <value_expression> AND <value_expression>

<boolean_factor>    ::=   [ NOT ] <boolean_primary>

<boolean_primary>    ::=
     <left_paren> <search_condition> <right_paren>
     | <predicate>

<boolean_term>    ::=
     <boolean_factor>
     | <boolean_term> AND <boolean_factor>

<box>    ::=
     BOX <left_paren>
         [ <coord_sys> <comma> ]
         <box_center>
         <comma> <numeric_value_expression>
         <comma> <numeric_value_expression>
     <right_paren>

<box_center>    ::=
     <coordinates>
     | <coord_value>

<cast_specification>    ::=
     CAST <left_paren> <value_expression> AS <cast_target> <right_paren>

<cast_target>    ::=
     <character_string_type>
     | <numeric_type>
     | <datetime_type>
     | <geometry_type>

<catalog_name>    ::=   <identifier>

<centroid>    ::=
     CENTROID <left_paren>
         <geometry_value_expression>
     <right_paren>

<character_factor>    ::=   <character_primary>

<character_primary>    ::=
     <value_expression_primary>
     | <string_value_function>

<character_representation>    ::=   <nonquote_character> | <quote_symbol>

<character_string_literal>    ::=
     <quote> [ <character_representation> ... ] <quote>

<character_string_type>    ::=
     CHAR [ <left paren> <length> <right paren> ]
     | VARCHAR [ <left paren> <length> <right paren> ]

<character_value_expression>    ::=   <concatenation> | <character_factor>

<circle>    ::=
     CIRCLE <left_paren>
         [ <coord_sys> <comma> ]
         <circle_center>
         <comma> <radius>
     <right_paren>

<circle_center>    ::=
     <coordinates>
     | <coord_value>

<circumflex>    ::=   ^

<coalesce_expression>    ::=
     COALESCE <left_paren>
         <value_expression>
         [ { <comma> <value_expression }... ] <right_paren>

<colon>    ::=  ":"

<column_name>    ::=   <identifier>

<column_name_list>    ::=   <column_name> [ { <comma> <column_name> }... ]

<column_reference>    ::=   [ <qualifier> <period> ] <column_name>

<comma>    ::=   ,

<comment>    ::=   <comment_introducer> [ <comment_character> ... ] <newline>

<comment_character>    ::=   <nonquote_character> | <quote>

<comment_introducer>    ::=   <minus_sign> <minus_sign> [<minus_sign>...]

<comp_op>    ::=
     <equals_operator>
     | <not_equals_operator>
     | <less_than_operator>
     | <greater_than_operator>
     | <less_than_or_equals_operator>
     | <greater_than_or_equals_operator>

<comparison_predicate>    ::=
     <value_expression> <comp_op> <value_expression>

<concatenation>    ::=
     <character_value_expression>
     <concatenation_operator>
     <character_factor>

<concatenation_operator>    ::=  "||"

<contains>    ::=
     CONTAINS <left_paren>
         <geometry_value_expression> <comma> <geometry_value_expression>
     <right_paren>

<coord1>    ::=   COORD1 <left_paren> <coord_value> <right_paren>

<coord2>    ::=   COORD2 <left_paren> <coord_value> <right_paren>

<coord_sys>    ::=   <character_string_literal>

<coord_value>    ::=   <point_value> | <column_reference>

<coordinate1>    ::=   <numeric_value_expression>

<coordinate2>    ::=   <numeric_value_expression>

<coordinates>    ::=   <coordinate1> <comma> <coordinate2>

<correlation_name>    ::=   <identifier>

<correlation_specification>    ::=   [ AS ] <correlation_name>

<datetime_type>    ::=   TIMESTAMP

<default_function_prefix>    ::=   (see text )

<delimited_identifier>    ::=
     <double_quote> <delimited_identifier_body> <double_quote>

<delimited_identifier_body>    ::=   <delimited_identifier_part> ...

<delimited_identifier_part>    ::=
     <nondoublequote_character> | <double_quote_symbol>

<delimiter_token>    ::=
     <character_string_literal>
     | <delimited_identifier>
     | <SQL_special_character>
     | <not_equals_operator>
     | <greater_than_or_equals_operator>
     | <less_than_or_equals_operator>
     | <concatenation_operator>
     | <double_period>
     | <left_bracket>
     | <right_bracket>

<derived_column>    ::=   <value_expression> [ <as_clause> ]

<derived_table>    ::=   <table_subquery>

<digit>    ::=   0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

<distance_function>    ::=
     DISTANCE <left_paren>
         <coord_value> <comma>
         <coord_value>
         <right_paren>
     | DISTANCE <left_paren>
         <numeric_value_expression> <comma>
         <numeric_value_expression> <comma>
         <numeric_value_expression> <comma>
         <numeric_value_expression>
         <right_paren>

<double_period>    ::=  ".."

<double_quote>    ::=  "" "

<double_quote_symbol>    ::=   <double_quote> <double_quote>

<equals_operator>    ::=  "="

<exact_numeric_literal>    ::=
     <unsigned_decimal> [ <period> [ <unsigned_decimal> ] ]
     | <period> <unsigned_decimal>

<exists_predicate>    ::=   EXISTS <table_subquery>

<exponent>    ::=   <signed_integer>

<extract_coordsys>    ::=
     COORDSYS <left_paren>
         <geometry_value_expression>
     <right_paren>

<exact_numeric_type>    ::=
     SMALLINT
     | INTEGER
     | BIGINT

<factor>    ::=   [ <sign> ] <numeric_primary>

<case_folding_function>    ::=
     LOWER <left_paren> <character_value_expression> <right_paren>
     | UPPER <left_paren> <character_value_expression> <right_paren>

<from_clause>    ::=
     FROM <table_reference>
         [ { <comma> <table_reference> }... ]

<general_literal>    ::=   <character_string_literal>

<general_set_function>    ::=
     <set_function_type> <left_paren>
         [ <set_quantifier> ] <value_expression>
     <right_paren>

<geometry_type>    ::=
     POINT
     | CIRCLE
     | POLYGON

<geometry_value_expression>    ::=
     <value_expression_primary> | <geometry_value_function>

<geometry_value_function>    ::=
     <box>
     | <centroid>
     | <circle>
     | <point>
     | <polygon>
     | <region>
     | <user_defined_function>

<greater_than_operator>    ::=  ">"

<greater_than_or_equals_operator>    ::=  ">="

<group_by_clause>    ::=   GROUP BY <group_by_term_list>

<group_by_term>    ::=
     <column_reference>
     | <value_expression>

<group_by_term_list>    ::=
     <group_by_term>
     [ { <comma> <group_by_term> }... ]

<having_clause>    ::=   HAVING <search_condition>

<identifier>    ::=   <regular_identifier> | <delimited_identifier>

<in_predicate>    ::=
     <value_expression> [ NOT ] IN <in_predicate_value>

<in_predicate_value>    ::=
     <table_subquery> | <left_paren> <in_value_list> <right_paren>

<in_unit_function>    ::=
     IN_UNIT <left_paren>
         <numeric_value_expression> <comma> <character_string_literal>
     <right_paren>

<in_value_list>    ::=
     <value_expression> { <comma> <value_expression> } ...

<intersects>    ::=
     INTERSECTS <left_paren>
         <geometry_value_expression> <comma> <geometry_value_expression>
     <right_paren>

<join_column_list>    ::=   <column_name_list>

<join_condition>    ::=   ON <search_condition>

<join_specification>    ::=   <join_condition> | <named_columns_join>

<join_type>    ::=
     INNER | <outer_join_type> [ OUTER ]

<joined_table>    ::=
     <qualified_join> | <left_paren> <joined_table> <right_paren>

<keyword>    ::=   <SQL_reserved_word> | <ADQL_reserved_word>

<left_bracket>    ::=  "["

<left_paren>    ::=   (

<less_than_operator>    ::=  "<"

<less_than_or_equals_operator>    ::=  "<="

<like_predicate>    ::=
     <match_value> [ NOT ] LIKE <pattern>
     | <match_value> [ NOT ] ILIKE <pattern>

<mantissa>    ::=   <exact_numeric_literal>

<match_value>    ::=   <character_value_expression>

<math_function>    ::=
     ABS <left_paren> <numeric_value_expression> <right_paren>
     | CEILING <left_paren> <numeric_value_expression> <right_paren>
     | DEGREES <left_paren> <numeric_value_expression> <right_paren>
     | EXP <left_paren> <numeric_value_expression> <right_paren>
     | FLOOR <left_paren> <numeric_value_expression> <right_paren>
     | LOG <left_paren> <numeric_value_expression> <right_paren>
     | LOG10 <left_paren> <numeric_value_expression> <right_paren>
     | MOD <left_paren>
         <numeric_value_expression> <comma> <numeric_value_expression>
     <right_paren>
     | PI <left_paren> <right_paren>
     | POWER <left_paren>
         <numeric_value_expression> <comma> <numeric_value_expression>
     <right_paren>
     | RADIANS <left_paren> <numeric_value_expression> <right_paren>
     | RAND <left_paren> [ <unsigned_decimal> ] <right_paren>
     | ROUND <left_paren>
         <numeric_value_expression> [ <comma> <signed_integer> ]
     <right_paren>
     | SQRT <left_paren> <numeric_value_expression> <right_paren>
     | TRUNCATE <left_paren>
         <numeric_value_expression>
         [ <comma> <signed_integer> ]
     <right_paren>

<minus_sign>    ::=   -

<named_columns_join>    ::=
     USING <left_paren>
         <join_column_list>
     <right_paren>

<newline>    ::=

<non_predicate_geometry_function>    ::=
     <area>
     | <coord1>
     | <coord2>
     | <distance>

<nondelimiter_token>    ::=
     <regular_identifier>
     | <keyword>
     | <unsigned_numeric_literal>

<nondoublequote_character>    ::=   any character except "

<nonquote_character>    ::=   any character except '

<not_equals_operator>    ::=   <not_equals_operator1> | <not_equals_operator2>

<not_equals_operator1>    ::=  "<>"

<not_equals_operator2>    ::=  "!="

<null_predicate>    ::=   <column_reference> IS [ NOT ] NULL

<numeric_geometry_function>    ::=
     <predicate_geometry_function> | <non_predicate_geometry_function>

<numeric_primary>    ::=
     <value_expression_primary>
     | <numeric_value_function>

<numeric_type>    ::=
     <exact_numeric_type>
     | <approximate_numeric_type>

<numeric_value_expression>    ::=
     <term>
     | <numeric_value_expression> <plus_sign> <term>
     | <numeric_value_expression> <minus_sign> <term>

<numeric_value_function>    ::=
     <trig_function>
     | <math_function>
     | <in_unit_function>
     | <numeric_geometry_function>
     | <user_defined_function>

<offset_clause>    ::=   OFFSET <unsigned_decimal>

<order_by_clause>    ::=   ORDER BY <order_by_term_list>

<order_by_direction>    ::=   ASC | DESC

<order_by_expression>    ::=
     <unsigned_decimal>
     | <column_reference>
     | <value_expression>

<order_by_term>    ::=
     <order_by_expression> [ <order_by_direction> ]

<order_by_term_list>    ::=
     <order_by_term> [ { <comma> <order_by_term> }... ]

<outer_join_type>    ::=   LEFT | RIGHT | FULL

<pattern>    ::=   <character_value_expression>

<percent>    ::=   %

<period>    ::=  "."

<plus_sign>    ::=   +

<point>    ::=
     POINT <left_paren>
         [ <coord_sys> <comma> ]
         <coordinates>
     <right_paren>

<point_value>    ::=   <point> | <centroid> | <user_defined_function>

<polygon>    ::=
     POLYGON <left_paren>
         [ <coord_sys> <comma> ]
         <polygon_vertices>
     <right_paren>

<polygon_vertices>    ::=
     <coordinates>
     <comma> <coordinates>
     <comma> <coordinates>
     { <comma> <coordinates> }...
     |
     <coord_value>
     <comma> <coord_value>
     <comma> <coord_value>
     { <comma> <coord_value> }...

<predicate>    ::=
     <comparison_predicate>
     | <between_predicate>
     | <in_predicate>
     | <like_predicate>
     | <null_predicate>
     | <exists_predicate>

<predicate_geometry_function>    ::=   <contains> | <intersects>

<qualified_join>    ::=
     <table_reference> [ NATURAL ] [ <join_type> ] JOIN
     <table_reference> [ <join_specification> ]

<qualifier>    ::=   <table_name> | <correlation_name>

<query_expression>    ::=
     <select_expression>
     | <joined_table>

<query_name>    ::=   <identifier>

<query_set_expression>    ::=
     <query_set_term>
     | <query_set_expression> UNION [ ALL ] <query_set_term>
     | <query_set_expression> EXCEPT [ ALL ] <query_set_term>

<query_set_primary>    ::=
     <select_query>
     | <left_paren> <select_expression> <right_paren>

<query_set_term>    ::=
     <query_set_primary>
     | <query_set_term> INTERSECT [ ALL ] <query_set_expression>

<query_specification>    ::=
     [ <with_clause> ]
     <select_expression>

<question_mark>    ::=   ?

<quote>    ::=   '

<quote_symbol>    ::=   <quote> <quote>

<radius>    ::=   <numeric_value_expression>

<region>    ::=
     REGION <left_paren> <character_string_literal> <right_paren>

<regular_identifier>    ::=
     <simple_Latin_letter> ...
     [ { <digit> | <simple_Latin_letter> | <underscore> }... ]

<right_bracket>    ::=  "]"

<right_paren>    ::=   )

<schema_name>    ::=   [ <catalog_name> <period> ] <unqualified_schema name>

<search_condition>    ::=
     <boolean_term>
     | <search_condition> OR <boolean_term>

<select_expression>    ::=
     <query_set_expression>
     [ <order_by_clause> ]
     [ <offset_clause> ]

<select_list>    ::=
     <asterisk>
     | <select_sublist> [ { <comma> <select_sublist> }... ]

<select_query>    ::=
     SELECT
     [ <set_quantifier> ]
     [ <set_limit> ]
     <select_list>
     <from_clause>
     [ <where_clause> ]
     [ <group_by_clause> ]
     [ <having_clause> ]

<select_sublist>    ::=   <derived_column> | <qualifier> <period> <asterisk>

<semicolon>    ::=   ;

<set_function_specification>    ::=
     COUNT <left_paren> <asterisk> <right_paren>
     | <general_set_function>

<set_function_type>    ::=   AVG | MAX | MIN | SUM | COUNT

<set_limit>    ::=   TOP <unsigned_decimal>

<set_quantifier>    ::=   DISTINCT | ALL

<sign>    ::=   <plus_sign> | <minus_sign>

<signed_integer>    ::=   [ <sign> ] <unsigned_decimal>

<simple_Latin_letter>    ::=
     <simple_Latin_upper_case_letter>
     | <simple_Latin_lower_case_letter>

<simple_Latin_lower_case_letter>    ::=
     a |b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z

<simple_Latin_upper_case_letter>    ::=
     A |B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z

<solidus>    ::=   /

<space>    ::=

<string_geometry_function>    ::=   <extract_coordsys>

<string_value_expression>    ::=   <character_value_expression>

<string_value_function>    ::=
     <string_geometry_function>
     | <case_folding_function>
     | <user_defined_function>

<subquery>    ::=   <left_paren> <query_expression> <right_paren>

<table_name>    ::=   [ <schema_name> <period> ] <identifier>

<table_reference>    ::=
     <table_name> [ <correlation_specification> ]
     | <derived_table> <correlation_specification>
     | <joined_table>

<table_subquery>    ::=   <subquery>

<term>    ::=
     <factor>
     | <term> <asterisk> <factor>
     | <term> <solidus> <factor>

<tilde>    ::=   ~

<token>    ::=
     <nondelimiter_token> | <delimiter_token>

<trig_function>    ::=
     ACOS <left_paren> <numeric_value_expression> <right_paren>
     | ASIN <left_paren> <numeric_value_expression> <right_paren>
     | ATAN <left_paren> <numeric_value_expression> <right_paren>
     | ATAN2 <left_paren>
         <numeric_value_expression> <comma> <numeric_value_expression>
     <right_paren>
     | COS <left_paren> <numeric_value_expression> <right_paren>
     | COT <left_paren> <numeric_value_expression> <right_paren>
     | SIN <left_paren> <numeric_value_expression> <right_paren>
     | TAN <left_paren> <numeric_value_expression> <right_paren>

<underscore>    ::=   _

<unqualified_schema name>    ::=   <identifier>

<unsigned_decimal>    ::=   <digit> ...

<unsigned_literal>    ::=
     <unsigned_numeric_literal>
     | <general_literal>

<unsigned_numeric_literal>    ::=
     <exact_numeric_literal>
     | <approximate_numeric_literal>

<unsigned_value_specification>    ::=   <unsigned_literal>

<user_defined_function>    ::=
     <user_defined_function_name> <left_paren>
         [
             <user_defined_function_param>
         [
             {
             <comma> <user_defined_function_param>
             }...
         ]
         ]
         <right_paren>

<user_defined_function_name>    ::=
     [ <default_function_prefix> ] <regular_identifier>

<user_defined_function_param>    ::=   <value_expression>

<value_expression>    ::=
     NULL
     | <numeric_value_expression>
     | <string_value_expression>
     | <geometry_value_expression>

<value_expression_primary>    ::=
     <unsigned_value_specification>
     | <column_reference>
     | <set_function_specification>
     | <cast_specification>
     | <coalesce_expression>
     | <left_paren> <value_expression> <right_paren>

<vertical_bar>    ::=  "|"

<where_clause>    ::=   WHERE <search_condition>

<with_clause>    ::=
     WITH <with_query> {, <with_query> } ...
     <with_query> :=
     <query_name> AS (<select_expression>)


Cross-Reference Table: Rules

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Rule (non-terminal) Rules using it
ADQL_reserved_word <keyword>
ampersand <SQL_special_character>
approximate_numeric_literal <unsigned_numeric_literal>
approximate_numeric_type <numeric_type>
area <non_predicate_geometry_function>
asterisk <select_list> <select_sublist> <set_function_specification> <SQL_special_character> <term>
as_clause <derived_column>
between_predicate <predicate>
boolean_factor <boolean_term>
boolean_primary <boolean_factor>
boolean_term <boolean_term> <search_condition>
box <geometry_value_function>
box_center <box>
case_folding_function <string_value_function>
cast_specification <value_expression_primary>
cast_target <cast_specification>
catalog_name <schema_name>
centroid <geometry_value_function> <point_value>
character_factor <character_value_expression> <concatenation>
character_primary <character_factor>
character_representation <character_string_literal>
character_string_literal <coord_sys> <delimiter_token> <general_literal> <in_unit_function> <region>
character_string_type <cast_target>
character_value_expression <case_folding_function> <concatenation> <match_value> <pattern> <string_value_expression>
circle <geometry_value_function>
circle_center <circle>
coalesce_expression <value_expression_primary>
colon <SQL_special_character>
column_name <as_clause> <column_name_list> <column_reference>
column_name_list <join_column_list>
column_reference <coord_value> <group_by_term> <null_predicate> <order_by_expression> <value_expression_primary>
comma <box> <circle> <coalesce_expression> <column_name_list> <contains> <coordinates> <distance_function> <from_clause> <group_by_term_list> <intersects> <in_unit_function> <in_value_list> <math_function> <order_by_term_list> <point> <polygon> <polygon_vertices> <select_list> <SQL_special_character> <trig_function> <user_defined_function>
comment_character <comment>
comment_introducer <comment>
comparison_predicate <predicate>
comp_op <comparison_predicate>
concatenation <character_value_expression>
concatenation_operator <concatenation> <delimiter_token>
contains <predicate_geometry_function>
coord1 <non_predicate_geometry_function>
coord2 <non_predicate_geometry_function>
coordinate1 <coordinates>
coordinate2 <coordinates>
coordinates <box_center> <circle_center> <point> <polygon_vertices>
coord_sys <box> <circle> <point> <polygon>
coord_value <box_center> <circle_center> <coord1> <coord2> <distance_function> <polygon_vertices>
correlation_name <correlation_specification> <qualifier>
correlation_specification <table_reference>
datetime_type <cast_target>
default_function_prefix <user_defined_function_name>
delimited_identifier <delimiter_token> <identifier>
delimited_identifier_body <delimited_identifier>
delimited_identifier_part <delimited_identifier_body>
delimiter_token <token>
derived_column <select_sublist>
derived_table <table_reference>
digit <ADQL_language_character> <regular_identifier> <unsigned_decimal>
distance <non_predicate_geometry_function>
double_period <delimiter_token>
double_quote <delimited_identifier> <double_quote_symbol> <SQL_special_character>
double_quote_symbol <delimited_identifier_part>
equals_operator <comp_op> <SQL_special_character>
exact_numeric_literal <mantissa> <unsigned_numeric_literal>
exact_numeric_type <numeric_type>
exists_predicate <predicate>
exponent <approximate_numeric_literal>
extract_coordsys <string_geometry_function>
factor <term>
from_clause <select_query>
general_literal <unsigned_literal>
general_set_function <set_function_specification>
geometry_type <cast_target>
geometry_value_expression <area> <centroid> <contains> <extract_coordsys> <intersects> <value_expression>
geometry_value_function <geometry_value_expression>
greater_than_operator <comp_op> <SQL_special_character>
greater_than_or_equals_operator <comp_op> <delimiter_token>
group_by_clause <select_query>
group_by_term <group_by_term_list>
group_by_term_list <group_by_clause>
having_clause <select_query>
identifier <catalog_name> <column_name> <correlation_name> <query_name> <table_name> <unqualified_schema name>
intersects <predicate_geometry_function>
in_predicate <predicate>
in_predicate_value <in_predicate>
in_unit_function <numeric_value_function>
in_value_list <in_predicate_value>
joined_table <joined_table> <query_expression> <table_reference>
join_column_list <named_columns_join>
join_condition <join_specification>
join_specification <qualified_join>
join_type <qualified_join>
keyword <nondelimiter_token>
left paren <character_string_type>
left_bracket <delimiter_token> <SQL_embedded_language_character>
left_paren <area> <boolean_primary> <box> <case_folding_function> <cast_specification> <centroid> <circle> <coalesce_expression> <contains> <coord1> <coord2> <distance_function> <extract_coordsys> <general_set_function> <intersects> <in_predicate_value> <in_unit_function> <joined_table> <math_function> <named_columns_join> <point> <polygon> <query_set_primary> <region> <set_function_specification> <SQL_special_character> <subquery> <trig_function> <user_defined_function> <value_expression_primary>
length <character_string_type>
less_than_operator <comp_op> <SQL_special_character>
less_than_or_equals_operator <comp_op> <delimiter_token>
like_predicate <predicate>
mantissa <approximate_numeric_literal>
match_value <like_predicate>
math_function <numeric_value_function>
minus_sign <comment_introducer> <numeric_value_expression> <sign> <SQL_special_character>
named_columns_join <join_specification>
newline <comment>
nondelimiter_token <token>
nondoublequote_character <delimited_identifier_part>
nonquote_character <character_representation> <comment_character>
non_predicate_geometry_function <numeric_geometry_function>
not_equals_operator <comp_op> <delimiter_token>
not_equals_operator1 <not_equals_operator>
not_equals_operator2 <not_equals_operator>
null_predicate <predicate>
numeric_geometry_function <numeric_value_function>
numeric_primary <factor>
numeric_type <cast_target>
numeric_value_expression <box> <coordinate1> <coordinate2> <distance_function> <in_unit_function> <math_function> <numeric_value_expression> <radius> <trig_function> <value_expression>
numeric_value_function <numeric_primary>
offset_clause <select_expression>
order_by_clause <select_expression>
order_by_direction <order_by_term>
order_by_expression <order_by_term>
order_by_term <order_by_term_list>
order_by_term_list <order_by_clause>
outer_join_type <join_type>
pattern <like_predicate>
percent <SQL_special_character>
period <column_reference> <exact_numeric_literal> <schema_name> <select_sublist> <SQL_special_character> <table_name>
plus_sign <numeric_value_expression> <sign> <SQL_special_character>
point <geometry_value_function> <point_value>
point_value <coord_value>
polygon <geometry_value_function>
polygon_vertices <polygon>
predicate <boolean_primary>
predicate_geometry_function <numeric_geometry_function>
qualified_join <joined_table>
qualifier <column_reference> <select_sublist>
query_expression <subquery>
query_name <with_clause>
query_set_expression <query_set_expression> <query_set_term> <select_expression>
query_set_primary <query_set_term>
query_set_term <query_set_expression> <query_set_term>
question_mark <SQL_special_character>
quote <character_string_literal> <comment_character> <quote_symbol> <SQL_special_character>
quote_symbol <character_representation>
radius <circle>
region <geometry_value_function>
regular_identifier <identifier> <nondelimiter_token> <user_defined_function_name>
right paren <character_string_type>
right_bracket <delimiter_token> <SQL_embedded_language_character>
right_paren <area> <boolean_primary> <box> <case_folding_function> <cast_specification> <centroid> <circle> <coalesce_expression> <contains> <coord1> <coord2> <distance_function> <extract_coordsys> <general_set_function> <intersects> <in_predicate_value> <in_unit_function> <joined_table> <math_function> <named_columns_join> <point> <polygon> <query_set_primary> <region> <set_function_specification> <SQL_special_character> <subquery> <trig_function> <user_defined_function> <value_expression_primary>
schema_name <table_name>
search_condition <boolean_primary> <having_clause> <join_condition> <search_condition> <where_clause>
select_expression <query_expression> <query_set_primary> <query_specification> <with_clause>
select_list <select_query>
select_query <query_set_primary>
select_sublist <select_list>
semicolon <SQL_special_character>
set_function_specification <value_expression_primary>
set_function_type <general_set_function>
set_limit <select_query>
set_quantifier <general_set_function> <select_query>
sign <factor> <signed_integer>
signed_integer <exponent> <math_function>
simple_Latin_letter <ADQL_language_character> <regular_identifier>
simple_Latin_lower_case_letter <simple_Latin_letter>
simple_Latin_upper_case_letter <simple_Latin_letter>
solidus <SQL_special_character> <term>
space <SQL_special_character>
SQL_reserved_word <keyword>
SQL_special_character <ADQL_language_character> <delimiter_token>
string_geometry_function <string_value_function>
string_value_expression <value_expression>
string_value_function <character_primary>
subquery <table_subquery>
table_name <qualifier> <table_reference>
table_reference <from_clause> <qualified_join>
table_subquery <derived_table> <exists_predicate> <in_predicate_value>
term <numeric_value_expression> <term>
trig_function <numeric_value_function>
underscore <regular_identifier> <SQL_special_character>
unqualified_schema name <schema_name>
unsigned_decimal <exact_numeric_literal> <math_function> <offset_clause> <order_by_expression> <set_limit> <signed_integer>
unsigned_literal <unsigned_value_specification>
unsigned_numeric_literal <nondelimiter_token> <unsigned_literal>
unsigned_value_specification <value_expression_primary>
user_defined_function <geometry_value_function> <numeric_value_function> <point_value> <string_value_function>
user_defined_function_name <user_defined_function>
user_defined_function_param <user_defined_function>
value_expression <between_predicate> <cast_specification> <coalesce_expression> <comparison_predicate> <derived_column> <general_set_function> <group_by_term> <in_predicate> <in_value_list> <order_by_expression> <user_defined_function_param> <value_expression_primary>
value_expression_primary <character_primary> <geometry_value_expression> <numeric_primary>
vertical_bar <SQL_special_character>
where_clause <select_query>
with_clause <query_specification>
with_query <with_clause>

Top


Cross-Reference Table: Keywords

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Keyword Rules using it
ABS <ADQL_reserved_word> <math_function>
ABSOLUTE <SQL_reserved_word>
ACOS <ADQL_reserved_word> <trig_function>
ACTION <SQL_reserved_word>
ADD <SQL_reserved_word>
ALL <query_set_expression> <query_set_term> <set_quantifier> <SQL_reserved_word>
ALLOCATE <SQL_reserved_word>
ALTER <SQL_reserved_word>
AND <between_predicate> <boolean_term> <SQL_reserved_word>
any <nondoublequote_character> <nonquote_character>
ANY <SQL_reserved_word>
ARE <SQL_reserved_word>
AREA <ADQL_reserved_word> <area>
AS <as_clause> <cast_specification> <correlation_specification> <SQL_reserved_word> <with_clause>
ASC <order_by_direction> <SQL_reserved_word>
ASIN <ADQL_reserved_word> <trig_function>
ASSERTION <SQL_reserved_word>
AT <SQL_reserved_word>
ATAN <ADQL_reserved_word> <trig_function>
ATAN2 <ADQL_reserved_word> <trig_function>
AUTHORIZATION <SQL_reserved_word>
AVG <set_function_type> <SQL_reserved_word>
BEGIN <SQL_reserved_word>
BETWEEN <between_predicate> <SQL_reserved_word>
BIGINT <ADQL_reserved_word> <exact_numeric_type>
BIT <SQL_reserved_word>
BIT_LENGTH <SQL_reserved_word>
BOTH <SQL_reserved_word>
BOX <ADQL_reserved_word> <box>
BY <group_by_clause> <order_by_clause> <SQL_reserved_word>
C <simple_Latin_upper_case_letter>
CASCADE <SQL_reserved_word>
CASCADED <SQL_reserved_word>
CASE <SQL_reserved_word>
CAST <cast_specification> <SQL_reserved_word>
CATALOG <SQL_reserved_word>
CEILING <ADQL_reserved_word> <math_function>
CENTROID <ADQL_reserved_word> <centroid>
CHAR <character_string_type> <SQL_reserved_word>
CHARACTER <SQL_reserved_word>
character <nondoublequote_character> <nonquote_character>
CHARACTER_LENGTH <SQL_reserved_word>
CHAR_LENGTH <SQL_reserved_word>
CHECK <SQL_reserved_word>
CIRCLE <ADQL_reserved_word> <circle> <geometry_type>
CLOSE <SQL_reserved_word>
COALESCE <coalesce_expression> <SQL_reserved_word>
COLLATE <SQL_reserved_word>
COLLATION <SQL_reserved_word>
COLUMN <SQL_reserved_word>
COMMIT <SQL_reserved_word>
CONNECT <SQL_reserved_word>
CONNECTION <SQL_reserved_word>
CONSTRAINT <SQL_reserved_word>
CONSTRAINTS <SQL_reserved_word>
CONTAINS <ADQL_reserved_word> <contains>
CONTINUE <SQL_reserved_word>
CONVERT <SQL_reserved_word>
COORD1 <ADQL_reserved_word> <coord1>
COORD2 <ADQL_reserved_word> <coord2>
COORDSYS <ADQL_reserved_word> <extract_coordsys>
CORRESPONDING <SQL_reserved_word>
COS <ADQL_reserved_word> <trig_function>
COT <ADQL_reserved_word> <trig_function>
COUNT <set_function_specification> <set_function_type> <SQL_reserved_word>
CREATE <SQL_reserved_word>
CROSS <SQL_reserved_word>
CURRENT <SQL_reserved_word>
CURRENT_DATE <SQL_reserved_word>
CURRENT_TIME <SQL_reserved_word>
CURRENT_TIMESTAMP <SQL_reserved_word>
CURRENT_USER <SQL_reserved_word>
CURSOR <SQL_reserved_word>
DATE <SQL_reserved_word>
DAY <SQL_reserved_word>
DEALLOCATE <SQL_reserved_word>
DECIMAL <SQL_reserved_word>
DECLARE <SQL_reserved_word>
DEFAULT <SQL_reserved_word>
DEFERRABLE <SQL_reserved_word>
DEFERRED <SQL_reserved_word>
DEGREES <ADQL_reserved_word> <math_function>
DELETE <SQL_reserved_word>
DESC <order_by_direction> <SQL_reserved_word>
DESCRIBE <SQL_reserved_word>
DESCRIPTOR <SQL_reserved_word>
DIAGNOSTICS <SQL_reserved_word>
DISCONNECT <SQL_reserved_word>
DISTANCE <ADQL_reserved_word> <distance_function>
DISTINCT <set_quantifier> <SQL_reserved_word>
DOMAIN <SQL_reserved_word>
DOUBLE <approximate numeric type> <SQL_reserved_word>
DROP <SQL_reserved_word>
ELSE <SQL_reserved_word>
END <SQL_reserved_word>
END-EXEC <SQL_reserved_word>
ESCAPE <SQL_reserved_word>
EXCEPT <query_set_expression> <SQL_reserved_word>
except <nondoublequote_character> <nonquote_character>
EXCEPTION <SQL_reserved_word>
EXEC <SQL_reserved_word>
EXECUTE <SQL_reserved_word>
EXISTS <exists_predicate> <SQL_reserved_word>
EXP <ADQL_reserved_word> <math_function>
EXTERNAL <SQL_reserved_word>
EXTRACT <SQL_reserved_word>
FALSE <SQL_reserved_word>
FETCH <SQL_reserved_word>
FIRST <SQL_reserved_word>
FLOAT <SQL_reserved_word>
FLOOR <ADQL_reserved_word> <math_function>
FOR <SQL_reserved_word>
FOREIGN <SQL_reserved_word>
FOUND <SQL_reserved_word>
FROM <from_clause> <SQL_reserved_word>
FULL <outer_join_type> <SQL_reserved_word>
GET <SQL_reserved_word>
GLOBAL <SQL_reserved_word>
GO <SQL_reserved_word>
GOTO <SQL_reserved_word>
GRANT <SQL_reserved_word>
GROUP <group_by_clause> <SQL_reserved_word>
gt <greater_than_operator> <greater_than_or_equals_operator> <not_equals_operator1>
HAVING <having_clause> <SQL_reserved_word>
HOUR <SQL_reserved_word>
IDENTITY <SQL_reserved_word>
ILIKE <ADQL_reserved_word> <like_predicate>
IMMEDIATE <SQL_reserved_word>
IN <in_predicate> <SQL_reserved_word>
INDICATOR <SQL_reserved_word>
INITIALLY <SQL_reserved_word>
INNER <join_type> <SQL_reserved_word>
INPUT <SQL_reserved_word>
INSENSITIVE <SQL_reserved_word>
INSERT <SQL_reserved_word>
INT <SQL_reserved_word>
INTEGER <exact_numeric_type> <SQL_reserved_word>
INTERSECT <query_set_term> <SQL_reserved_word>
INTERSECTS <ADQL_reserved_word> <intersects>
INTERVAL <SQL_reserved_word>
INTO <SQL_reserved_word>
IN_UNIT <ADQL_reserved_word> <in_unit_function>
IS <null_predicate> <SQL_reserved_word>
ISOLATION <SQL_reserved_word>
JOIN <qualified_join> <SQL_reserved_word>
KEY <SQL_reserved_word>
LANGUAGE <SQL_reserved_word>
LAST <SQL_reserved_word>
LEADING <SQL_reserved_word>
LEFT <outer_join_type> <SQL_reserved_word>
LEVEL <SQL_reserved_word>
LIKE <like_predicate> <SQL_reserved_word>
LOCAL <SQL_reserved_word>
LOG <ADQL_reserved_word> <math_function>
LOG10 <ADQL_reserved_word> <math_function>
LOWER <case_folding_function> <SQL_reserved_word>
lt <coalesce_expression> <less_than_operator> <less_than_or_equals_operator> <not_equals_operator1>
MATCH <SQL_reserved_word>
MAX <set_function_type> <SQL_reserved_word>
MIN <set_function_type> <SQL_reserved_word>
MINUTE <SQL_reserved_word>
MOD <ADQL_reserved_word> <math_function>
MODULE <SQL_reserved_word>
MONTH <SQL_reserved_word>
NAMES <SQL_reserved_word>
NATIONAL <SQL_reserved_word>
NATURAL <qualified_join> <SQL_reserved_word>
NCHAR <SQL_reserved_word>
NEXT <SQL_reserved_word>
NO <SQL_reserved_word>
NOT <between_predicate> <boolean_factor> <in_predicate> <like_predicate> <null_predicate> <SQL_reserved_word>
NULL <null_predicate> <SQL_reserved_word> <value_expression>
NULLIF <SQL_reserved_word>
NUMERIC <SQL_reserved_word>
OCTET_LENGTH <SQL_reserved_word>
OF <SQL_reserved_word>
OFFSET <ADQL_reserved_word> <offset_clause>
ON <join_condition> <SQL_reserved_word>
ONLY <SQL_reserved_word>
OPEN <SQL_reserved_word>
OPTION <SQL_reserved_word>
OR <search_condition> <SQL_reserved_word>
ORDER <order_by_clause> <SQL_reserved_word>
OUTER <join_type> <SQL_reserved_word>
OUTPUT <SQL_reserved_word>
OVERLAPS <SQL_reserved_word>
PAD <SQL_reserved_word>
PARTIAL <SQL_reserved_word>
PI <ADQL_reserved_word> <math_function>
POINT <ADQL_reserved_word> <geometry_type> <point>
POLYGON <ADQL_reserved_word> <geometry_type> <polygon>
POSITION <SQL_reserved_word>
POWER <ADQL_reserved_word> <math_function>
PRECISION <approximate numeric type> <SQL_reserved_word>
PREPARE <SQL_reserved_word>
PRESERVE <SQL_reserved_word>
PRIMARY <SQL_reserved_word>
PRIOR <SQL_reserved_word>
PRIVILEGES <SQL_reserved_word>
PROCEDURE <SQL_reserved_word>
PUBLIC <SQL_reserved_word>
RADIANS <ADQL_reserved_word> <math_function>
RAND <ADQL_reserved_word> <math_function>
READ <SQL_reserved_word>
REAL <approximate numeric type> <SQL_reserved_word>
REFERENCES <SQL_reserved_word>
REGION <ADQL_reserved_word> <region>
RELATIVE <SQL_reserved_word>
RESTRICT <SQL_reserved_word>
REVOKE <SQL_reserved_word>
RIGHT <outer_join_type> <SQL_reserved_word>
ROLLBACK <SQL_reserved_word>
ROUND <ADQL_reserved_word> <math_function>
ROWS <SQL_reserved_word>
SCHEMA <SQL_reserved_word>
SCROLL <SQL_reserved_word>
SECOND <SQL_reserved_word>
SECTION <SQL_reserved_word>
see <default_function_prefix>
SELECT <select_query> <SQL_reserved_word>
SESSION <SQL_reserved_word>
SESSION_USER <SQL_reserved_word>
SET <SQL_reserved_word>
SIN <ADQL_reserved_word> <trig_function>
SIZE <SQL_reserved_word>
SMALLINT <exact_numeric_type> <SQL_reserved_word>
SOME <SQL_reserved_word>
SPACE <SQL_reserved_word>
SQL <SQL_reserved_word>
SQLCODE <SQL_reserved_word>
SQLERROR <SQL_reserved_word>
SQLSTATE <SQL_reserved_word>
SQRT <ADQL_reserved_word> <math_function>
SUBSTRING <SQL_reserved_word>
SUM <set_function_type> <SQL_reserved_word>
SYSTEM_USER <SQL_reserved_word>
TABLE <SQL_reserved_word>
TAN <ADQL_reserved_word> <trig_function>
TEMPORARY <SQL_reserved_word>
text <default_function_prefix>
THEN <SQL_reserved_word>
TIME <SQL_reserved_word>
TIMESTAMP <datetime_type> <SQL_reserved_word>
TIMEZONE_HOUR <SQL_reserved_word>
TIMEZONE_MINUTE <SQL_reserved_word>
TO <SQL_reserved_word>
TOP <ADQL_reserved_word> <set_limit>
TRAILING <SQL_reserved_word>
TRANSACTION <SQL_reserved_word>
TRANSLATE <SQL_reserved_word>
TRANSLATION <SQL_reserved_word>
TRIM <SQL_reserved_word>
TRUE <SQL_reserved_word>
TRUNCATE <ADQL_reserved_word> <math_function>
UNION <query_set_expression> <SQL_reserved_word>
UNIQUE <SQL_reserved_word>
UNKNOWN <SQL_reserved_word>
UPDATE <SQL_reserved_word>
UPPER <case_folding_function> <SQL_reserved_word>
USAGE <SQL_reserved_word>
USER <SQL_reserved_word>
USING <named_columns_join> <SQL_reserved_word>
VALUE <SQL_reserved_word>
VALUES <SQL_reserved_word>
value_expression <coalesce_expression>
VARCHAR <character_string_type> <SQL_reserved_word>
VARYING <SQL_reserved_word>
VIEW <SQL_reserved_word>
WHEN <SQL_reserved_word>
WHENEVER <SQL_reserved_word>
WHERE <SQL_reserved_word> <where_clause>
WITH <SQL_reserved_word> <with_clause>
WORK <SQL_reserved_word>
WRITE <SQL_reserved_word>
YEAR <SQL_reserved_word>
ZONE <SQL_reserved_word>

Top


Please send feedback to Jonathan Leffler: jonathan.leffler@gmail.com .