Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<sql-implementation> ::=
<direct SQL statement>
<direct SQL statement> ::=
[ <separator> ] <directly executable statement> <semicolon>
<separator> ::=
{ <comment> | <white spaces> } ...
<comment> ::=
<simple comment>
| <bracketed comment>
<simple comment> ::=
- - [ <comment character> ... ] <newline>
<comment character> ::=
<wchar_t> -= <newline>
<wchar_t> ::=
\u0001 .. \uffff
<newline> ::=
\n \r
| \r \n
| \n
| \r
<bracketed comment> ::=
<bracketed comment introducer> <bracketed comment contents> <bracketed comment terminator>
<bracketed comment introducer> ::=
/ *
<bracketed comment contents> ::=
[ { <bracketed comment character> | <bracketed comment> } ... ]
<bracketed comment character> ::=
<wchar_t> -= { <asterisk> | <solidus> }
| <solidus> { <wchar_t> -= <asterisk> }
| <asterisk> { <wchar_t> -= <solidus> }
<asterisk> ::=
*
<solidus> ::=
/
<bracketed comment terminator> ::=
* /
<white spaces> ::=
<white space> ... -: <white space>
<white space> ::=
\t
| \s
| \n
| \r
| \nl
| \x000b
| \x000C
| \x0085
| \x2028
| \x2029
| \x00a0
| \x1680
| \x2000
| \x2001
| \x2002
| \x2003
| \x2004
| \x2005
| \x2006
| \x2007
| \x2008
| \x2009
| \x200a
| \x202f
| \x3000
<directly executable statement> ::=
<direct SQL data statement>
| <SQL schema statement>
| <SQL transaction statement>
| <SQL connection statement>
| <SQL session statement>
| <direct implementation-defined statement>
<direct SQL data statement> ::=
<delete statement: searched>
| <direct select statement: multiple rows>
| <insert statement>
| <update statement: searched>
| <merge statement>
| <temporary table declaration>
<delete statement: searched> ::=
DELETE FROM <target table> [ [ AS ] <correlation name> ] [ WHERE <search condition> ]
DELETE ::=
D E L E T E
FROM ::=
F R O M
<target table> ::=
<table name>
| ONLY <left paren> <table name> <right paren>
<table name> ::=
<local or schema qualified name>
<local or schema qualified name> ::=
[ <local or schema qualifier> <period> ] <qualified identifier>
<local or schema qualifier> ::=
<schema name>
| <local qualifier>
<schema name> ::=
[ <catalog name> <period> ] <unqualified schema name>
<catalog name> ::=
<identifier>
<identifier> ::=
<actual identifier>
<actual identifier> ::=
<regular identifier>
| <delimited identifier>
| <Unicode delimited identifier>
<regular identifier> ::=
<identifier body> -= <reserved word>
<identifier body> ::=
<identifier start> [ <identifier part> ... ] -: <identifier part> /* */
<identifier start> ::=
A .. Z
| <underscore>
A ::=
a
<underscore> ::=
_
<identifier part> ::=
<identifier start>
| <identifier extend>
| <digit>
<identifier extend> ::=
\u00b7
<digit> ::=
0 .. 9
<reserved word> ::=
ABS
| ALL
| ALLOCATE
| ALTER
| AND
| <ANY>
| ARE
| ARRAY
| AS
| ASENSITIVE
| ASYMMETRIC
| AT
| ATOMIC
| AUTHORIZATION
| AVG
| BEGIN
| BETWEEN
| BIGINT
| BINARY
| BLOB
| BOOLEAN
| BOTH
| BY
| CALL
| CALLED
| CARDINALITY
| CASCADED
| CASE
| CAST
| CEIL
| CEILING
| CHAR
| CHAR_LENGTH
| CHARACTER
| CHARACTER_LENGTH
| CHECK
| CLOB
| CLOSE
| COALESCE
| COLLATE
| COLLECT
| COLUMN
| COMMIT
| CONDITION
| CONNECT
| CONSTRAINT
| CONVERT
| CORR
| CORRESPONDING
| COUNT
| COVAR_POP
| COVAR_SAMP
| CREATE
| CROSS
| CUBE
| CUME_DIST
| CURRENT
| CURRENT_DATE
| CURRENT_DEFAULT_TRANSFORM_GROUP
| CURRENT_PATH
| CURRENT_ROLE
| CURRENT_TIME
| CURRENT_TIMESTAMP
| CURRENT_TRANSFORM_GROUP_FOR_TYPE
| CURRENT_USER
| CURSOR
| CYCLE
| DATE
| DAY
| DEALLOCATE
| DEC
| DECIMAL
| DECLARE
| DEFAULT
| DELETE
| DENSE_RANK
| DEREF
| DESCRIBE
| DETERMINISTIC
| DISCONNECT
| DISTINCT
| DOUBLE
| DROP
| DYNAMIC
| EACH
| ELEMENT
| ELSE
| END
| END-EXEC
| ESCAPE
| EVERY
| EXCEPT
| EXEC
| EXECUTE
| EXISTS
| EXP
| EXTERNAL
| EXTRACT
| FALSE
| FETCH
| FILTER
| FLOAT
| FLOOR
| FOR
| FOREIGN
| FREE
| FROM
| FULL
| FUNCTION
| FUSION
| GET
| GLOBAL
| GRANT
| GROUP
| GROUPING
| HAVING
| HOLD
| HOUR
| IDENTITY
| IN
| INDICATOR
| INNER
| INOUT
| INSENSITIVE
| INSERT
| INT
| INTEGER
| INTERSECT
| INTERSECTION
| INTERVAL
| INTO
| IS
| JOIN
| LANGUAGE
| LARGE
| LATERAL
| LEADING
| LEFT
| LIKE
| LN
| LOCAL
| LOCALTIME
| LOCALTIMESTAMP
| LOWER
| MATCH
| MAX
| MEMBER
| MERGE
| METHOD
| MIN
| MINUTE
| MOD
| MODIFIES
| MODULE
| MONTH
| MULTISET
| NATIONAL
| NATURAL
| NCHAR
| NCLOB
| NEW
| NO
| <NONE>
| NORMALIZE
| NOT
| NULL
| NULLIF
| NUMERIC
| OCTET_LENGTH
| OF
| OLD
| ON
| ONLY
| OPEN
| OR
| ORDER
| OUT
| OUTER
| OVER
| OVERLAPS
| OVERLAY
| PARAMETER
| PARTITION
| PERCENT_RANK
| PERCENTILE_CONT
| PERCENTILE_DISC
| POSITION
| POWER
| PRECISION
| PREPARE
| PRIMARY
| PROCEDURE
| RANGE
| RANK
| READS
| REAL
| RECURSIVE
| REF
| REFERENCES
| REFERENCING
| REGR_AVGX
| REGR_AVGY
| REGR_COUNT
| REGR_INTERCEPT
| REGR_R2
| REGR_SLOPE
| REGR_SXX
| REGR_SXY
| REGR_SYY
| RELEASE
| RESULT
| RETURN
| RETURNS
| REVOKE
| RIGHT
| ROLLBACK
| ROLLUP
| ROW
| ROW_NUMBER
| ROWS
| SAVEPOINT
| SCOPE
| SCROLL
| SEARCH
| SECOND
| SELECT
| SENSITIVE
| SESSION_USER
| SET
| SIMILAR
| SMALLINT
| SOME
| SPECIFIC
| SPECIFICTYPE
| SQL
| SQLEXCEPTION
| SQLSTATE
| SQLWARNING
| SQRT
| START
| STATIC
| STDDEV_POP
| STDDEV_SAMP
| SUBMULTISET
| SUBSTRING
| SUM
| SYMMETRIC
| SYSTEM
| SYSTEM_USER
| TABLE
| TABLESAMPLE
| THEN
| TIME
| TIMESTAMP
| TIMEZONE_HOUR
| TIMEZONE_MINUTE
| TO
| TRAILING
| TRANSLATE
| TRANSLATION
| TREAT
| TRIGGER
| TRIM
| TRUE
| UESCAPE
| UNION
| UNIQUE
| UNKNOWN
| UNNEST
| UPDATE
| UPPER
| USER
| USING
| VALUE
| VALUES
| VAR_POP
| VAR_SAMP
| VARCHAR
| VARYING
| WHEN
| WHENEVER
| WHERE
| WIDTH_BUCKET
| WINDOW
| WITH
| WITHIN
| WITHOUT
| YEAR
ABS ::=
A B S
B ::=
b
ALL ::=
A L L
ALLOCATE ::=
A L L O C A T E
C ::=
c
ALTER ::=
A L T E R
AND ::=
A N D
<ANY> ::=
A N Y
ARE ::=
A R E
ARRAY ::=
A R R A Y
AS ::=
A S
ASENSITIVE ::=
A S E N S I T I V E
ASYMMETRIC ::=
A S Y M M E T R I C
AT ::=
A T
ATOMIC ::=
A T O M I C
AUTHORIZATION ::=
A U T H O R I Z A T I O N
AVG ::=
A V G
BEGIN ::=
B E G I N
BETWEEN ::=
B E T W E E N
BIGINT ::=
B I G I N T
BINARY ::=
B I N A R Y
BLOB ::=
B L O B
BOOLEAN ::=
B O O L E A N
BOTH ::=
B O T H
BY ::=
B Y
CALL ::=
C A L L
CALLED ::=
C A L L E D
CARDINALITY ::=
C A R D I N A L I T Y
CASCADED ::=
C A S C A D E D
CASE ::=
C A S E
CAST ::=
C A S T
CEIL ::=
C E I L
CEILING ::=
C E I L I N G
CHAR ::=
C H A R
CHAR_LENGTH ::=
C H A R _ L E N G T H
CHARACTER ::=
C H A R A C T E R
CHARACTER_LENGTH ::=
C H A R A C T E R _ L E N G T H
CHECK ::=
C H E C K
CLOB ::=
C L O B
CLOSE ::=
C L O S E
COALESCE ::=
C O A L E S C E
COLLATE ::=
C O L L A T E
COLLECT ::=
C O L L E C T
COLUMN ::=
C O L U M N
COMMIT ::=
C O M M I T
CONDITION ::=
C O N D I T I O N
CONNECT ::=
C O N N E C T
CONSTRAINT ::=
C O N S T R A I N T
CONVERT ::=
C O N V E R T
CORR ::=
C O R R
CORRESPONDING ::=
C O R R E S P O N D I N G
COUNT ::=
C O U N T
COVAR_POP ::=
C O V A R _ P O P
COVAR_SAMP ::=
C O V A R _ S A M P
CREATE ::=
C R E A T E
CROSS ::=
C R O S S
CUBE ::=
C U B E
CUME_DIST ::=
C U M E _ D I S T
CURRENT ::=
C U R R E N T
CURRENT_DATE ::=
C U R R E N T _ D A T E
CURRENT_DEFAULT_TRANSFORM_GROUP ::=
C U R R E N T _ D E F A U L T _ T R A N S F O R M _ G R O U P
CURRENT_PATH ::=
C U R R E N T _ P A T H
CURRENT_ROLE ::=
C U R R E N T _ R O L E
CURRENT_TIME ::=
C U R R E N T _ T I M E
CURRENT_TIMESTAMP ::=
C U R R E N T _ T I M E S T A M P
CURRENT_TRANSFORM_GROUP_FOR_TYPE ::=
C U R R E N T _ T R A N S F O R M _ G R O U P _ F O R _ T Y P E
CURRENT_USER ::=
C U R R E N T _ U S E R
CURSOR ::=
C U R S O R
CYCLE ::=
C Y C L E
DATE ::=
D A T E
DAY ::=
D A Y
DEALLOCATE ::=
D E A L L O C A T E
DEC ::=
D E C
DECIMAL ::=
D E C I M A L
DECLARE ::=
D E C L A R E
DEFAULT ::=
D E F A U L T
DENSE_RANK ::=
D E N S E _ R A N K
DEREF ::=
D E R E F
DESCRIBE ::=
D E S C R I B E
DETERMINISTIC ::=
D E T E R M I N I S T I C
DISCONNECT ::=
D I S C O N N E C T
DISTINCT ::=
D I S T I N C T
DOUBLE ::=
D O U B L E
DROP ::=
D R O P
DYNAMIC ::=
D Y N A M I C
EACH ::=
E A C H
ELEMENT ::=
E L E M E N T
ELSE ::=
E L S E
END ::=
E N D
END-EXEC ::=
E N D - E X E C
ESCAPE ::=
E S C A P E
EVERY ::=
E V E R Y
EXCEPT ::=
E X C E P T
EXEC ::=
E X E C
EXECUTE ::=
E X E C U T E
EXISTS ::=
E X I S T S
EXP ::=
E X P
EXTERNAL ::=
E X T E R N A L
EXTRACT ::=
E X T R A C T
FALSE ::=
F A L S E
FETCH ::=
F E T C H
FILTER ::=
F I L T E R
FLOAT ::=
F L O A T
FLOOR ::=
F L O O R
FOR ::=
F O R
FOREIGN ::=
F O R E I G N
FREE ::=
F R E E
FULL ::=
F U L L
FUNCTION ::=
F U N C T I O N
FUSION ::=
F U S I O N
GET ::=
G E T
GLOBAL ::=
G L O B A L
GRANT ::=
G R A N T
GROUP ::=
G R O U P
GROUPING ::=
G R O U P I N G
HAVING ::=
H A V I N G
HOLD ::=
H O L D
HOUR ::=
H O U R
IDENTITY ::=
I D E N T I T Y
IN ::=
I N
INDICATOR ::=
I N D I C A T O R
INNER ::=
I N N E R
INOUT ::=
I N O U T
INSENSITIVE ::=
I N S E N S I T I V E
INSERT ::=
I N S E R T
INT ::=
I N T
INTEGER ::=
I N T E G E R
INTERSECT ::=
I N T E R S E C T
INTERSECTION ::=
I N T E R S E C T I O N
INTERVAL ::=
I N T E R V A L
INTO ::=
I N T O
IS ::=
I S
JOIN ::=
J O I N
LANGUAGE ::=
L A N G U A G E
LARGE ::=
L A R G E
LATERAL ::=
L A T E R A L
LEADING ::=
L E A D I N G
LEFT ::=
L E F T
LIKE ::=
L I K E
LN ::=
L N
LOCAL ::=
L O C A L
LOCALTIME ::=
L O C A L T I M E
LOCALTIMESTAMP ::=
L O C A L T I M E S T A M P
LOWER ::=
L O W E R
MATCH ::=
M A T C H
MAX ::=
M A X
MEMBER ::=
M E M B E R
MERGE ::=
M E R G E
METHOD ::=
M E T H O D
MIN ::=
M I N
MINUTE ::=
M I N U T E
MOD ::=
M O D
MODIFIES ::=
M O D I F I E S
MODULE ::=
M O D U L E
MONTH ::=
M O N T H
MULTISET ::=
M U L T I S E T
NATIONAL ::=
N A T I O N A L
NATURAL ::=
N A T U R A L
NCHAR ::=
N C H A R
NCLOB ::=
N C L O B
NEW ::=
N E W
NO ::=
N O
<NONE> ::=
N O N E
NORMALIZE ::=
N O R M A L I Z E
NOT ::=
N O T
NULL ::=
N U L L
NULLIF ::=
N U L L I F
NUMERIC ::=
N U M E R I C
OCTET_LENGTH ::=
O C T E T _ L E N G T H
OF ::=
O F
OLD ::=
O L D
ON ::=
O N
ONLY ::=
O N L Y
OPEN ::=
O P E N
OR ::=
O R
ORDER ::=
O R D E R
OUT ::=
O U T
OUTER ::=
O U T E R
OVER ::=
O V E R
OVERLAPS ::=
O V E R L A P S
OVERLAY ::=
O V E R L A Y
PARAMETER ::=
P A R A M E T E R
PARTITION ::=
P A R T I T I O N
PERCENT_RANK ::=
P E R C E N T _ R A N K
PERCENTILE_CONT ::=
P E R C E N T I L E _ C O N T
PERCENTILE_DISC ::=
P E R C E N T I L E _ D I S C
POSITION ::=
P O S I T I O N
POWER ::=
P O W E R
PRECISION ::=
P R E C I S I O N
PREPARE ::=
P R E P A R E
PRIMARY ::=
P R I M A R Y
PROCEDURE ::=
P R O C E D U R E
RANGE ::=
R A N G E
RANK ::=
R A N K
READS ::=
R E A D S
REAL ::=
R E A L
RECURSIVE ::=
R E C U R S I V E
REF ::=
R E F
REFERENCES ::=
R E F E R E N C E S
REFERENCING ::=
R E F E R E N C I N G
REGR_AVGX ::=
R E G R _ A V G X
REGR_AVGY ::=
R E G R _ A V G Y
REGR_COUNT ::=
R E G R _ C O U N T
REGR_INTERCEPT ::=
R E G R _ I N T E R C E P T
REGR_R2 ::=
R E G R _ R 2
REGR_SLOPE ::=
R E G R _ S L O P E
REGR_SXX ::=
R E G R _ S X X
REGR_SXY ::=
R E G R _ S X Y
REGR_SYY ::=
R E G R _ S Y Y
RELEASE ::=
R E L E A S E
RESULT ::=
R E S U L T
RETURN ::=
R E T U R N
RETURNS ::=
R E T U R N S
REVOKE ::=
R E V O K E
RIGHT ::=
R I G H T
ROLLBACK ::=
R O L L B A C K
ROLLUP ::=
R O L L U P
ROW ::=
R O W
ROW_NUMBER ::=
R O W _ N U M B E R
ROWS ::=
R O W S
SAVEPOINT ::=
S A V E P O I N T
SCOPE ::=
S C O P E
SCROLL ::=
S C R O L L
SEARCH ::=
S E A R C H
SECOND ::=
S E C O N D
SELECT ::=
S E L E C T
SENSITIVE ::=
S E N S I T I V E
SESSION_USER ::=
S E S S I O N _ U S E R
SET ::=
S E T
SIMILAR ::=
S I M I L A R
SMALLINT ::=
S M A L L I N T
SOME ::=
S O M E
SPECIFIC ::=
S P E C I F I C
SPECIFICTYPE ::=
S P E C I F I C T Y P E
SQL ::=
S Q L
SQLEXCEPTION ::=
S Q L E X C E P T I O N
SQLSTATE ::=
S Q L S T A T E
SQLWARNING ::=
S Q L W A R N I N G
SQRT ::=
S Q R T
START ::=
S T A R T
STATIC ::=
S T A T I C
STDDEV_POP ::=
S T D D E V _ P O P
STDDEV_SAMP ::=
S T D D E V _ S A M P
SUBMULTISET ::=
S U B M U L T I S E T
SUBSTRING ::=
S U B S T R I N G
SUM ::=
S U M
SYMMETRIC ::=
S Y M M E T R I C
SYSTEM ::=
S Y S T E M
SYSTEM_USER ::=
S Y S T E M _ U S E R
TABLE ::=
T A B L E
TABLESAMPLE ::=
T A B L E S A M P L E
THEN ::=
T H E N
TIME ::=
T I M E
TIMESTAMP ::=
T I M E S T A M P
TIMEZONE_HOUR ::=
T I M E Z O N E _ H O U R
TIMEZONE_MINUTE ::=
T I M E Z O N E _ M I N U T E
TO ::=
T O
TRAILING ::=
T R A I L I N G
TRANSLATE ::=
T R A N S L A T E
TRANSLATION ::=
T R A N S L A T I O N
TREAT ::=
T R E A T
TRIGGER ::=
T R I G G E R
TRIM ::=
T R I M
TRUE ::=
T R U E
UESCAPE ::=
U E S C A P E
UNION ::=
U N I O N
UNIQUE ::=
U N I Q U E
UNKNOWN ::=
U N K N O W N
UNNEST ::=
U N N E S T
UPDATE ::=
U P D A T E
UPPER ::=
U P P E R
USER ::=
U S E R
USING ::=
U S I N G
VALUE ::=
V A L U E
VALUES ::=
V A L U E S
VAR_POP ::=
V A R _ P O P
VAR_SAMP ::=
V A R _ S A M P
VARCHAR ::=
V A R C H A R
VARYING ::=
V A R Y I N G
WHEN ::=
W H E N
WHENEVER ::=
W H E N E V E R
WHERE ::=
W H E R E
WIDTH_BUCKET ::=
W I D T H _ B U C K E T
WINDOW ::=
W I N D O W
WITH ::=
W I T H
WITHIN ::=
W I T H I N
WITHOUT ::=
W I T H O U T
YEAR ::=
Y E A R
<delimited identifier> ::=
<double quote> <delimited identifier body> <double quote>
<double quote> ::=
"
<delimited identifier body> ::=
{ <delimited identifier part> ... } -= <delimited identifier body is long>
<delimited identifier part> ::=
<nondoublequote character>
| <doublequote symbol>
<nondoublequote character> ::=
<wchar_t> -= <double quote>
<doublequote symbol> ::=
" "
<delimited identifier body is long> ::=
<delimited identifier part> [ 128 ] <delimited identifier part> ...
<Unicode delimited identifier> ::=
U <ampersand> <double quote> <Unicode delimiter body> <double quote> <Unicode escape specifier>
<ampersand> ::=
&
<Unicode delimiter body> ::=
<Unicode identifier part> ...
<Unicode identifier part> ::=
<delimited identifier part>
| <Unicode escape value>
<Unicode escape value> ::=
<Unicode 4 digit escape value>
| <Unicode 6 digit escape value>
| <Unicode character escape value>
<Unicode 4 digit escape value> ::=
<Unicode escape character>
<hexit>
<hexit>
<hexit>
<hexit>
<Unicode escape character> ::=
!!
<hexit> ::=
<digit>
| A
| B
| C
| D
| E
| F
| a
| b
| c
| d
| e
| f
<Unicode 6 digit escape value> ::=
<Unicode escape character>
<plus sign>
<hexit>
<hexit>
<hexit>
<hexit>
<hexit>
<hexit>
<plus sign> ::=
+
<Unicode character escape value> ::=
<Unicode escape character> <Unicode escape character>
<Unicode escape specifier> ::=
[ UESCAPE <quote> <Unicode escape character> <quote> ]
<quote> ::=
'
<period> ::=
.
<unqualified schema name> ::=
<identifier>
<local qualifier> ::=
MODULE
<qualified identifier> ::=
<identifier>
<left paren> ::=
(
<right paren> ::=
)
<correlation name> ::=
<identifier>
<search condition> ::=
<boolean value expression>
<boolean value expression> ::=
<boolean term>
| <boolean value expression> OR <boolean term>
<boolean term> ::=
<boolean factor>
| <boolean term> AND <boolean factor>
<boolean factor> ::=
[ NOT ] <boolean test>
<boolean test> ::=
<boolean primary> [ IS [ NOT ] <truth value> ]
<boolean primary> ::=
<predicate>
| <boolean predicand>
<predicate> ::=
<comparison predicate>
| <between predicate>
| <in predicate>
| <like predicate>
| <similar predicate>
| <null predicate>
| <quantified comparison predicate>
| <exists predicate>
| <unique predicate>
| <normalized predicate>
| <match predicate>
| <overlaps predicate>
| <distinct predicate>
| <member predicate>
| <submultiset predicate>
| <set predicate>
| <type predicate>
<comparison predicate> ::=
<numeric value expression> <comp op> <numeric value expression>
<numeric value expression> ::=
<term>
| <numeric value expression> <plus sign> <term>
| <numeric value expression> <minus sign> <term>
<term> ::=
<factor>
| <term> <asterisk> <factor>
| <term> <solidus> <factor>
<factor> ::=
[ <sign> ] <numeric primary>
<sign> ::=
<plus sign>
| <minus sign>
<minus sign> ::=
-
<numeric primary> ::=
<string value expression>
| <numeric value function>
<string value expression> ::=
<character value expression>
<character value expression> ::=
<concatenation>
| <character factor>
<concatenation> ::=
<character value expression> <concatenation operator> <character factor>
<concatenation operator> ::=
| |
<character factor> ::=
<character primary> [ <collate clause> ]
<character primary> ::=
<value expression primary>
| <string value function>
<value expression primary> ::=
<parenthesized value expression>
| <nonparenthesized value expression primary>
<parenthesized value expression> ::=
<left paren> <value expression> <right paren>
<value expression> ::=
<boolean value expression>
<nonparenthesized value expression primary> ::=
<unsigned value specification>
| <column reference>
| <set function specification>
| <window function>
| <scalar subquery>
| <case expression>
| <cast specification>
| <subtype treatment>
| <static method invocation>
| <new specification>
| <attribute or method reference>
| <reference resolution>
| <collection value constructor>
| <array element reference>
| <multiset element reference>
| <routine or method invocation>
| <next value expression>
<unsigned value specification> ::=
<unsigned literal>
| <general value specification>
<unsigned literal> ::=
<unsigned numeric literal>
| <general literal>
<unsigned numeric literal> ::=
<exact numeric literal>
| <approximate numeric literal>
<exact numeric literal> ::=
<unsigned integer> [ <period> [ <unsigned integer> ] ]
| <period> <unsigned integer>
<unsigned integer> ::=
<digit> ...
<approximate numeric literal> ::=
<mantissa> E <exponent>
<mantissa> ::=
<exact numeric literal>
<exponent> ::=
<signed integer>
<signed integer> ::=
[ <sign> ] <unsigned integer>
<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> ::=
<quote> [ <character representation> ... ] <quote>
<character representation> ::=
<nonquote character>
| <quote symbol>
<nonquote character> ::=
<wchar_t> -= <quote>
<quote symbol> ::=
<quote> <quote>
<national character string literal> ::=
N <quote> [ <character representation> ... ] <quote> [ { <separator> <quote> [ <character representation> ... ] <quote> } ... ]
<Unicode character string literal> ::=
[ <introducer> <character set specification> ] U <ampersand> <quote> [ <Unicode representation> ... ] <quote> [ { <separator> <quote> [ <Unicode representation> ... ] <quote> } ... ] <Unicode escape specifier>
<introducer> ::=
<underscore>
<Unicode representation> ::=
<character representation>
| <Unicode escape value>
<binary string literal> ::=
X <quote> [ { <hexit> <hexit> } ... ] <quote> [ { <separator> <quote> [ { <hexit> <hexit> } ... ] <quote> } ... ]
<datetime literal> ::=
<date literal>
| <time literal>
| <timestamp literal>
<date literal> ::=
DATE <date string>
<date string> ::=
<quote> <unquoted date string> <quote>
<unquoted date string> ::=
<date value>
<date value> ::=
<years value>
<minus sign>
<months value>
<minus sign>
<days value>
<years value> ::=
<datetime value>
<datetime value> ::=
<unsigned integer>
<months value> ::=
<datetime value>
<days value> ::=
<datetime value>
<time literal> ::=
TIME <time string>
<time string> ::=
<quote> <unquoted time string> <quote>
<unquoted time string> ::=
<time value> [ <time zone interval> ]
<time value> ::=
<hours value>
<colon>
<minutes value>
<colon>
<seconds value>
<hours value> ::=
<datetime value>
<colon> ::=
:
<minutes value> ::=
<datetime value>
<seconds value> ::=
<seconds integer value> [ <period> [ <seconds fraction> ] ]
<seconds integer value> ::=
<unsigned integer>
<seconds fraction> ::=
<unsigned integer>
<time zone interval> ::=
<sign>
<hours value>
<colon>
<minutes value>
<timestamp literal> ::=
TIMESTAMP <timestamp string>
<timestamp string> ::=
<quote> <unquoted timestamp string> <quote>
<unquoted timestamp string> ::=
<unquoted date string> <space> <unquoted time string>
<space> ::=
\s
<interval literal> ::=
INTERVAL [ <sign> ] <interval string> <interval qualifier>
<interval string> ::=
<quote> <unquoted interval string> <quote>
<unquoted interval string> ::=
[ <sign> ] { <year-month literal> | <day-time literal> }
<year-month literal> ::=
<years value> [ <minus sign> <months value> ]
| <months value>
<day-time literal> ::=
<day-time interval>
| <time interval>
<day-time interval> ::=
<days value> [ <space> <hours value> [ <colon> <minutes value> [ <colon> <seconds value> ] ] ]
<time interval> ::=
<hours value> [ <colon> <minutes value> [ <colon> <seconds value> ] ]
| <minutes value> [ <colon> <seconds value> ]
| <seconds value>
<interval qualifier> ::=
<start field> TO <end field>
| <single datetime field>
<start field> ::=
<non-second primary datetime field> [ <left paren> <interval leading field precision> <right paren> ]
<non-second primary datetime field> ::=
YEAR
| MONTH
| DAY
| HOUR
| MINUTE
<interval leading field precision> ::=
<unsigned integer>
<end field> ::=
<non-second primary datetime field>
| SECOND [ <left paren> <interval fractional seconds precision> <right paren> ]
<interval fractional seconds precision> ::=
<unsigned integer>
<single datetime field> ::=
<non-second primary datetime field> [ <left paren> <interval leading field precision> <right paren> ]
| SECOND [ <left paren> <interval leading field precision> [ <comma> <interval fractional seconds precision> ] <right paren> ]
<comma> ::=
,
<boolean literal> ::=
TRUE
| FALSE
| UNKNOWN
<general value specification> ::=
<host parameter specification>
| <SQL parameter reference>
| <dynamic parameter specification>
| <embedded variable specification>
| <current collation specification>
| CURRENT_DEFAULT_TRANSFORM_GROUP
| CURRENT_PATH
| CURRENT_ROLE
| CURRENT_TRANSFORM_GROUP_FOR_TYPE <path-resolved user-defined type name>
| CURRENT_USER
| SESSION_USER
| SYSTEM_USER
| USER
| VALUE
<host parameter specification> ::=
<host parameter name> [ <indicator parameter> ]
<host parameter name> ::=
<colon> <identifier>
<indicator parameter> ::=
[ INDICATOR ] <host parameter name>
<SQL parameter reference> ::=
<basic identifier chain>
<basic identifier chain> ::=
<identifier chain>
<identifier chain> ::=
<identifier> [ { <period> <identifier> } ... ]
<dynamic parameter specification> ::=
<question mark>
<question mark> ::=
?
<embedded variable specification> ::=
<embedded variable name> [ <indicator variable> ]
<embedded variable name> ::=
<colon> <host identifier>
<host identifier> ::=
<Ada host identifier>
| <C host identifier>
| <COBOL host identifier>
| <Fortran host identifier>
| <MUMPS host identifier>
| <Pascal host identifier>
| <PL/I host identifier>
<Ada host identifier> ::=
!!
<C host identifier> ::=
!!
<COBOL host identifier> ::=
!!
<Fortran host identifier> ::=
!!
<MUMPS host identifier> ::=
!!
<Pascal host identifier> ::=
!!
<PL/I host identifier> ::=
!!
<indicator variable> ::=
[ INDICATOR ] <embedded variable name>
<current collation specification> ::=
COLLATION
FOR
<left paren>
<string value expression>
<right paren>
COLLATION ::=
C O L L A T I O N
<path-resolved user-defined type name> ::=
<user-defined type name>
<user-defined type name> ::=
[ <schema name> <period> ] <qualified identifier>
<column reference> ::=
<basic identifier chain>
<set function specification> ::=
<aggregate function>
| <grouping operation>
<aggregate function> ::=
COUNT <left paren> <asterisk> <right paren> [ <filter clause> ]
| <general set function> [ <filter clause> ]
| <binary set function> [ <filter clause> ]
| <ordered set function> [ <filter clause> ]
<filter clause> ::=
FILTER
<left paren>
WHERE
<search condition>
<right paren>
<general set function> ::=
<set function type> <left paren> [ <set quantifier> ] <value expression> <right paren>
<set function type> ::=
<computational operation>
<computational operation> ::=
AVG
| MAX
| MIN
| SUM
| EVERY
| <ANY>
| SOME
| COUNT
| STDDEV_POP
| STDDEV_SAMP
| VAR_SAMP
| VAR_POP
| COLLECT
| FUSION
| INTERSECTION
<set quantifier> ::=
DISTINCT
| ALL
<binary set function> ::=
<binary set function type>
<left paren>
<dependent variable expression>
<comma>
<independent variable expression>
<right paren>
<binary set function type> ::=
COVAR_POP
| COVAR_SAMP
| CORR
| REGR_SLOPE
| REGR_INTERCEPT
| REGR_COUNT
| REGR_R2
| REGR_AVGX
| REGR_AVGY
| REGR_SXX
| REGR_SYY
| REGR_SXY
<dependent variable expression> ::=
<numeric value expression>
<independent variable expression> ::=
<numeric value expression>
<ordered set function> ::=
<hypothetical set function>
| <inverse distribution function>
<hypothetical set function> ::=
<rank function type>
<left paren>
<hypothetical set function value expression list>
<right paren>
<within group specification>
<rank function type> ::=
RANK
| DENSE_RANK
| PERCENT_RANK
| CUME_DIST
<hypothetical set function value expression list> ::=
<value expression> [ { <comma> <value expression> } ... ]
<within group specification> ::=
WITHIN
GROUP
<left paren>
ORDER
BY
<sort specification list>
<right paren>
<sort specification list> ::=
<sort specification> [ { <comma> <sort specification> } ... ]
<sort specification> ::=
<sort key> [ <ordering specification> ] [ <null ordering> ]
<sort key> ::=
<value expression>
<ordering specification> ::=
ASC
| DESC
ASC ::=
A S C
DESC ::=
D E S C
<null ordering> ::=
NULLS FIRST
| NULLS LAST
NULLS ::=
N U L L S
FIRST ::=
F I R S T
LAST ::=
L A S T
<inverse distribution function> ::=
<inverse distribution function type>
<left paren>
<inverse distribution function argument>
<right paren>
<within group specification>
<inverse distribution function type> ::=
PERCENTILE_CONT
| PERCENTILE_DISC
<inverse distribution function argument> ::=
<numeric value expression>
<grouping operation> ::=
GROUPING <left paren> <column reference> [ { <comma> <column reference> } ... ] <right paren>
<window function> ::=
<window function type> OVER <window name or specification>
<window function type> ::=
<rank function type> <left paren> <right paren>
| ROW_NUMBER <left paren> <right paren>
| <aggregate function>
<window name or specification> ::=
<window name>
| <in-line window specification>
<window name> ::=
<identifier>
<in-line window specification> ::=
<window specification>
<window specification> ::=
<left paren> <window specification details> <right paren>
<window specification details> ::=
[ <existing window name> ] [ <window partition clause> ] [ <window order clause> ] [ <window frame clause> ]
<existing window name> ::=
<window name>
<window partition clause> ::=
PARTITION BY <window partition column reference list>
<window partition column reference list> ::=
<window partition column reference> [ { <comma> <window partition column reference> } ... ]
<window partition column reference> ::=
<column reference> [ <collate clause> ]
<collate clause> ::=
COLLATE <collation name>
<collation name> ::=
<schema qualified name>
<schema qualified name> ::=
[ <schema name> <period> ] <qualified identifier>
<window order clause> ::=
ORDER BY <sort specification list>
<window frame clause> ::=
<window frame units> <window frame extent> [ <window frame exclusion> ]
<window frame units> ::=
ROWS
| RANGE
<window frame extent> ::=
<window frame start>
| <window frame between>
<window frame start> ::=
UNBOUNDED PRECEDING
| <window frame preceding>
| CURRENT ROW
UNBOUNDED ::=
U N B O U N D E D
PRECEDING ::=
P R E C E D I N G
<window frame preceding> ::=
<unsigned value specification> PRECEDING
<window frame between> ::=
BETWEEN
<window frame bound 1>
AND
<window frame bound 2>
<window frame bound 1> ::=
<window frame bound>
<window frame bound> ::=
<window frame start>
| UNBOUNDED FOLLOWING
| <window frame following>
FOLLOWING ::=
F O L L O W I N G
<window frame following> ::=
<unsigned value specification> FOLLOWING
<window frame bound 2> ::=
<window frame bound>
<window frame exclusion> ::=
EXCLUDE CURRENT ROW
| EXCLUDE GROUP
| EXCLUDE TIES
| EXCLUDE NO OTHERS
EXCLUDE ::=
E X C L U D E
TIES ::=
T I E S
OTHERS ::=
O T H E R S
<scalar subquery> ::=
<subquery>
<subquery> ::=
<left paren> <query expression> <right paren>
<query expression> ::=
[ <with clause> ] <query expression body>
<with clause> ::=
WITH [ RECURSIVE ] <with list>
<with list> ::=
<with list element> [ { <comma> <with list element> } ... ]
<with list element> ::=
<query name> [ <left paren> <with column list> <right paren> ] AS <left paren> <query expression> <right paren> [ <search or cycle clause> ]
<query name> ::=
<identifier>
<with column list> ::=
<column name list>
<column name list> ::=
<column name> [ { <comma> <column name> } ... ]
<column name> ::=
<identifier>
<search or cycle clause> ::=
<search clause>
| <cycle clause>
| <search clause> <cycle clause>
<search clause> ::=
SEARCH
<recursive search order>
SET
<sequence column>
<recursive search order> ::=
DEPTH FIRST BY <sort specification list>
| BREADTH FIRST BY <sort specification list>
DEPTH ::=
D E P T H
BREADTH ::=
B R E A D T H
<sequence column> ::=
<column name>
<cycle clause> ::=
CYCLE
<cycle column list>
SET
<cycle mark column>
TO
<cycle mark value>
DEFAULT
<non-cycle mark value>
USING
<path column>
<cycle column list> ::=
<cycle column> [ { <comma> <cycle column> } ... ]
<cycle column> ::=
<column name>
<cycle mark column> ::=
<column name>
<cycle mark value> ::=
<value expression>
<non-cycle mark value> ::=
<value expression>
<path column> ::=
<column name>
<query expression body> ::=
<query term>
| <query expression body> UNION [ ALL | DISTINCT ] [ <corresponding spec> ] <query term>
| <query expression body> EXCEPT [ ALL | DISTINCT ] [ <corresponding spec> ] <query term>
<query term> ::=
<query primary>
| <query term> INTERSECT [ ALL | DISTINCT ] [ <corresponding spec> ] <query primary>
<query primary> ::=
<simple table>
| <left paren> <query expression body> <right paren>
<simple table> ::=
<query specification>
| <table value constructor>
| <explicit table>
<query specification> ::=
SELECT [ <set quantifier> ] <select list> <table expression>
<select list> ::=
<asterisk>
| <select sublist> [ { <comma> <select sublist> } ... ]
<select sublist> ::=
<derived column>
| <qualified asterisk>
<derived column> ::=
<value expression> [ <as clause> ]
<as clause> ::=
[ AS ] <column name>
<qualified asterisk> ::=
<asterisked identifier chain> <period> <asterisk>
| <all fields reference>
<asterisked identifier chain> ::=
<asterisked identifier> [ { <period> <asterisked identifier> } ... ]
<asterisked identifier> ::=
<identifier>
<all fields reference> ::=
<value expression primary> <period> <asterisk> [ AS <left paren> <all fields column name list> <right paren> ]
<all fields column name list> ::=
<column name list>
<table expression> ::=
<from clause> [ <where clause> ] [ <group by clause> ] [ <having clause> ] [ <window clause> ]
<from clause> ::=
FROM <table reference list>
<table reference list> ::=
<table reference> [ { <comma> <table reference> } ... ]
<table reference> ::=
<table factor>
| <joined table>
<table factor> ::=
<table primary> [ <sample clause> ]
<table primary> ::=
<table or query name> [ [ AS ] <correlation name> [ <left paren> <derived column list> <right paren> ] ]
| <derived table> [ AS ] <correlation name> [ <left paren> <derived column list> <right paren> ]
| <lateral derived table> [ AS ] <correlation name> [ <left paren> <derived column list> <right paren> ]
| <collection derived table> [ AS ] <correlation name> [ <left paren> <derived column list> <right paren> ]
| <table function derived table> [ AS ] <correlation name> [ <left paren> <derived column list> <right paren> ]
| <only spec> [ [ AS ] <correlation name> [ <left paren> <derived column list> <right paren> ] ]
| <left paren> <joined table> <right paren>
<table or query name> ::=
<table name>
<derived column list> ::=
<column name list>
<derived table> ::=
<table subquery>
<table subquery> ::=
<subquery>
<lateral derived table> ::=
LATERAL <table subquery>
<collection derived table> ::=
UNNEST <left paren> <collection value expression> <right paren> [ WITH ORDINALITY ]
<collection value expression> ::=
<array value expression>
| <multiset value expression>
<array value expression> ::=
<array concatenation>
| <array primary>
<array concatenation> ::=
<array value expression 1> <concatenation operator> <array primary>
<array value expression 1> ::=
<array value expression>
<array primary> ::=
<value expression primary>
<multiset value expression> ::=
<multiset term>
| <multiset value expression> MULTISET UNION [ ALL | DISTINCT ] <multiset term>
| <multiset value expression> MULTISET EXCEPT [ ALL | DISTINCT ] <multiset term>
<multiset term> ::=
<multiset primary>
| <multiset term> MULTISET INTERSECT [ ALL | DISTINCT ] <multiset primary>
<multiset primary> ::=
<multiset value function>
| <value expression primary>
<multiset value function> ::=
<multiset set function>
<multiset set function> ::=
SET
<left paren>
<multiset value expression>
<right paren>
ORDINALITY ::=
O R D I N A L I T Y
<table function derived table> ::=
TABLE
<left paren>
<collection value expression>
<right paren>
<only spec> ::=
ONLY
<left paren>
<table or query name>
<right paren>
<joined table> ::=
<cross join>
| <qualified join>
| <natural join>
<cross join> ::=
<table reference>
CROSS
JOIN
<table factor>
<qualified join> ::=
<table reference> [ <join type> ] JOIN <table reference> <join specification>
<join type> ::=
INNER
| <outer join type> [ OUTER ]
<outer join type> ::=
LEFT
| RIGHT
| FULL
<join specification> ::=
<join condition>
| <named columns join>
<join condition> ::=
ON <search condition>
<named columns join> ::=
USING
<left paren>
<join column list>
<right paren>
<join column list> ::=
<column name list>
<natural join> ::=
<table reference> NATURAL [ <join type> ] JOIN <table factor>
<sample clause> ::=
TABLESAMPLE <sample method> <left paren> <sample percentage> <right paren> [ <repeatable clause> ]
<sample method> ::=
BERNOULLI
| SYSTEM
BERNOULLI ::=
B E R N O U L L I
<sample percentage> ::=
<numeric value expression>
<repeatable clause> ::=
REPEATABLE
<left paren>
<repeat argument>
<right paren>
REPEATABLE ::=
R E P E A T A B L E
<repeat argument> ::=
<numeric value expression>
<where clause> ::=
WHERE <search condition>
<group by clause> ::=
GROUP BY [ <set quantifier> ] <grouping element list>
<grouping element list> ::=
<grouping element> [ { <comma> <grouping element> } ... ]
<grouping element> ::=
<ordinary grouping set>
| <rollup list>
| <cube list>
| <grouping sets specification>
| <empty grouping set>
<ordinary grouping set> ::=
<grouping column reference>
| <left paren> <grouping column reference list> <right paren>
<grouping column reference> ::=
<column reference> [ <collate clause> ]
<grouping column reference list> ::=
<grouping column reference> [ { <comma> <grouping column reference> } ... ]
<rollup list> ::=
ROLLUP
<left paren>
<ordinary grouping set list>
<right paren>
<ordinary grouping set list> ::=
<ordinary grouping set> [ { <comma> <ordinary grouping set> } ... ]
<cube list> ::=
CUBE
<left paren>
<ordinary grouping set list>
<right paren>
<grouping sets specification> ::=
GROUPING
SETS
<left paren>
<grouping set list>
<right paren>
SETS ::=
S E T S
<grouping set list> ::=
<grouping set> [ { <comma> <grouping set> } ... ]
<grouping set> ::=
<ordinary grouping set>
| <rollup list>
| <cube list>
| <grouping sets specification>
| <empty grouping set>
<empty grouping set> ::=
<left paren> <right paren>
<having clause> ::=
HAVING <search condition>
<window clause> ::=
WINDOW <window definition list>
<window definition list> ::=
<window definition> [ { <comma> <window definition> } ... ]
<window definition> ::=
<new window name> AS <window specification>
<new window name> ::=
<window name>
<table value constructor> ::=
VALUES <row value expression list>
<row value expression list> ::=
<table row value expression> [ { <comma> <table row value expression> } ... ]
<table row value expression> ::=
<row value special case>
| <row value constructor>
<row value special case> ::=
<nonparenthesized value expression primary>
<row value constructor> ::=
<common value expression>
| <boolean value expression>
| <explicit row value constructor>
<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>
<datetime value expression> ::=
<datetime term>
| <interval value expression> <plus sign> <datetime term>
| <datetime value expression> <plus sign> <interval term>
| <datetime value expression> <minus sign> <interval term>
<datetime term> ::=
<datetime factor>
<datetime factor> ::=
<datetime primary> [ <time zone> ]
<datetime primary> ::=
<value expression primary>
| <datetime value function>
<datetime value function> ::=
<current date value function>
| <current time value function>
| <current timestamp value function>
| <current local time value function>
| <current local timestamp value function>
<current date value function> ::=
CURRENT_DATE
<current time value function> ::=
CURRENT_TIME [ <left paren> <time precision> <right paren> ]
<time precision> ::=
<time fractional seconds precision>
<time fractional seconds precision> ::=
<unsigned integer>
<current timestamp value function> ::=
CURRENT_TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]
<timestamp precision> ::=
<time fractional seconds precision>
<current local time value function> ::=
LOCALTIME [ <left paren> <time precision> <right paren> ]
<current local timestamp value function> ::=
LOCALTIMESTAMP [ <left paren> <timestamp precision> <right paren> ]
<time zone> ::=
AT <time zone specifier>
<time zone specifier> ::=
LOCAL
| TIME ZONE <interval primary>
ZONE ::=
Z O N E
<interval primary> ::=
<value expression primary> [ <interval qualifier> ]
| <interval value function>
<interval value function> ::=
<interval absolute value function>
<interval absolute value function> ::=
ABS
<left paren>
<interval value expression>
<right paren>
<interval value expression> ::=
<interval term>
| <interval value expression 1> <plus sign> <interval term 1>
| <interval value expression 1> <minus sign> <interval term 1>
| <left paren> <datetime value expression> <minus sign> <datetime term> <right paren> <interval qualifier>
<interval term> ::=
<interval factor>
| <interval term 2> <asterisk> <factor>
| <interval term 2> <solidus> <factor>
| <term> <asterisk> <interval factor>
<interval factor> ::=
[ <sign> ] <interval primary>
<interval term 2> ::=
<interval term>
<interval value expression 1> ::=
<interval value expression>
<interval term 1> ::=
<interval term>
<user-defined type value expression> ::=
<value expression primary>
<reference value expression> ::=
<value expression primary>
<explicit row value constructor> ::=
<left paren> <row value constructor element> <comma> <row value constructor element list> <right paren>
| ROW <left paren> <row value constructor element list> <right paren>
| <row subquery>
<row value constructor element> ::=
<value expression>
<row value constructor element list> ::=
<row value constructor element> [ { <comma> <row value constructor element> } ... ]
<row subquery> ::=
<subquery>
<explicit table> ::=
TABLE <table or query name>
<corresponding spec> ::=
CORRESPONDING [ BY <left paren> <corresponding column list> <right paren> ]
<corresponding column list> ::=
<column name list>
<case expression> ::=
<case abbreviation>
| <case specification>
<case abbreviation> ::=
NULLIF <left paren> <value expression> <comma> <value expression> <right paren>
| COALESCE <left paren> <value expression> { <comma> <value expression> } ... <right paren>
<case specification> ::=
<simple case>
| <searched case>
<simple case> ::=
CASE <case operand> <simple when clause> ... [ <else clause> ] END
<case operand> ::=
<row value predicand>
| <overlaps predicate part 1>
<row value predicand> ::=
<value expression>
<overlaps predicate part 1> ::=
<row value predicand 1>
<row value predicand 1> ::=
<row value predicand>
<simple when clause> ::=
WHEN
<when operand>
THEN
<result>
<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>
| <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>
<comparison predicate part 2> ::=
<comp op> <row value predicand>
<comp op> ::=
<equals operator>
| <not equals operator>
| <less than operator>
| <greater than operator>
| <less than or equals operator>
| <greater than or equals operator>
<equals operator> ::=
=
<not equals operator> ::=
<>
<less than operator> ::=
<
<greater than operator> ::=
>
<less than or equals operator> ::=
< =
<greater than or equals operator> ::=
> =
<between predicate part 2> ::=
[ NOT ] BETWEEN [ ASYMMETRIC | SYMMETRIC ] <row value predicand> AND <row value predicand>
<in predicate part 2> ::=
[ NOT ] IN <in predicate value>
<in predicate value> ::=
<table subquery>
| <left paren> <in value list> <right paren>
<in value list> ::=
<row value expression> [ { <comma> <row value expression> } ... ]
<row value expression> ::=
<row value special case>
| <explicit row value constructor>
<character like predicate part 2> ::=
[ NOT ] LIKE <character pattern> [ ESCAPE <escape character> ]
<character pattern> ::=
<character value expression>
<escape character> ::=
<character value expression>
<octet like predicate part 2> ::=
[ NOT ] LIKE <octet pattern> [ ESCAPE <escape octet> ]
<octet pattern> ::=
<blob value expression>
<blob value expression> ::=
<blob concatenation>
| <blob factor>
<blob concatenation> ::=
<blob value expression> <concatenation operator> <blob factor>
<blob factor> ::=
<blob primary>
<blob primary> ::=
<value expression primary>
| <string value function>
<string value function> ::=
<character value function>
<character value function> ::=
<character substring function>
| <regular expression substring function>
| <fold>
| <transcoding>
| <character transliteration>
| <trim function>
| <character overlay function>
| <normalize function>
| <specific type method>
<character substring function> ::=
SUBSTRING <left paren> <character value expression> FROM <start position> [ FOR <string length> ] [ USING <char length units> ] <right paren>
<start position> ::=
<numeric value expression>
<string length> ::=
<numeric value expression>
<char length units> ::=
CHARACTERS
| OCTETS
CHARACTERS ::=
C H A R A C T E R S
OCTETS ::=
O C T E T S
<regular expression substring function> ::=
SUBSTRING
<left paren>
<character value expression>
SIMILAR
<character value expression>
ESCAPE
<escape character>
<right paren>
<fold> ::=
{ UPPER | LOWER } <left paren> <character value expression> <right paren>
<transcoding> ::=
CONVERT
<left paren>
<character value expression>
USING
<transcoding name>
<right paren>
<transcoding name> ::=
<schema qualified name>
<character transliteration> ::=
TRANSLATE
<left paren>
<character value expression>
USING
<transliteration name>
<right paren>
<transliteration name> ::=
<schema qualified name>
<trim function> ::=
TRIM
<left paren>
<trim operands>
<right paren>
<trim operands> ::=
[ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>
<trim specification> ::=
LEADING
| TRAILING
| BOTH
<trim character> ::=
<character value expression>
<trim source> ::=
<character value expression>
<character overlay function> ::=
OVERLAY <left paren> <character value expression> PLACING <character value expression> FROM <start position> [ FOR <string length> ] [ USING <char length units> ] <right paren>
PLACING ::=
P L A C I N G
<normalize function> ::=
NORMALIZE
<left paren>
<character value expression>
<right paren>
<specific type method> ::=
<user-defined type value expression> <period> SPECIFICTYPE [ <left paren> <right paren> ]
<escape octet> ::=
<blob value expression>
<similar predicate part 2> ::=
[ NOT ] SIMILAR TO <similar pattern> [ ESCAPE <escape character> ]
<similar pattern> ::=
<character value expression>
<null predicate part 2> ::=
IS [ NOT ] NULL
<quantified comparison predicate part 2> ::=
<comp op> <quantifier> <table subquery>
<quantifier> ::=
<all>
| <some>
<all> ::=
ALL
<some> ::=
SOME
| <ANY>
<normalized predicate part 2> ::=
IS [ NOT ] NORMALIZED
NORMALIZED ::=
N O R M A L I Z E D
<match predicate part 2> ::=
MATCH [ UNIQUE ] [ SIMPLE | PARTIAL | FULL ] <table subquery>
SIMPLE ::=
S I M P L E
PARTIAL ::=
P A R T I A L
<overlaps predicate part 2> ::=
OVERLAPS <row value predicand 2>
<row value predicand 2> ::=
<row value predicand>
<distinct predicate part 2> ::=
IS [ NOT ] DISTINCT FROM <row value predicand 4>
<row value predicand 4> ::=
<row value predicand>
<member predicate part 2> ::=
[ NOT ] MEMBER [ OF ] <multiset value expression>
<submultiset predicate part 2> ::=
[ NOT ] SUBMULTISET [ OF ] <multiset value expression>
<set predicate part 2> ::=
IS [ NOT ] A SET
<type predicate part 2> ::=
IS [ NOT ] OF <left paren> <type list> <right paren>
<type list> ::=
<user-defined type specification> [ { <comma> <user-defined type specification> } ... ]
<user-defined type specification> ::=
<inclusive user-defined type specification>
| <exclusive user-defined type specification>
<inclusive user-defined type specification> ::=
<path-resolved user-defined type name>
<exclusive user-defined type specification> ::=
ONLY <path-resolved user-defined type name>
<result> ::=
<result expression>
| NULL
<result expression> ::=
<value expression>
<else clause> ::=
ELSE <result>
<searched case> ::=
CASE <searched when clause> ... [ <else clause> ] END
<searched when clause> ::=
WHEN
<search condition>
THEN
<result>
<cast specification> ::=
CAST
<left paren>
<cast operand>
AS
<cast target>
<right paren>
<cast operand> ::=
<value expression>
| <implicitly typed value specification>
<implicitly typed value specification> ::=
<null specification>
| <empty specification>
<null specification> ::=
NULL
<empty specification> ::=
ARRAY <left bracket or trigraph> <right bracket or trigraph>
| MULTISET <left bracket or trigraph> <right bracket or trigraph>
<left bracket or trigraph> ::=
<left bracket>
| <left bracket trigraph>
<left bracket> ::=
[
<left bracket trigraph> ::=
? ? (
<right bracket or trigraph> ::=
<right bracket>
| <right bracket trigraph>
<right bracket> ::=
[
<right bracket trigraph> ::=
? ? )
<cast target> ::=
<domain name>
| <data type>
<domain name> ::=
<schema qualified name>
<data type> ::=
<predefined type>
| <row type>
| <path-resolved user-defined type name>
| <reference type>
| <collection type>
<predefined type> ::=
<character string type> [ CHARACTER SET <character set specification> ] [ <collate clause> ]
| <national character string type> [ <collate clause> ]
| <binary large object string type>
| <numeric type>
| <boolean type>
| <datetime type>
| <interval type>
<character string type> ::=
CHARACTER [ <left paren> <length> <right paren> ]
| CHAR [ <left paren> <length> <right paren> ]
| CHARACTER VARYING <left paren> <length> <right paren>
| CHAR VARYING <left paren> <length> <right paren>
| VARCHAR <left paren> <length> <right paren>
| <character large object type>
<length> ::=
<unsigned integer> [ <char length units> ]
<character large object type> ::=
CHARACTER LARGE OBJECT [ <left paren> <large object length> <right paren> ]
| CHAR LARGE OBJECT [ <left paren> <large object length> <right paren> ]
| CLOB [ <left paren> <large object length> <right paren> ]
OBJECT ::=
O B J E C T
<large object length> ::=
<unsigned integer> [ <multiplier> ] [ <char length units> ]
| <large object length token> [ <char length units> ]
<multiplier> ::=
K
| M
| G
<large object length token> ::=
<digit> ... <multiplier>
<national character string type> ::=
NATIONAL CHARACTER [ <left paren> <length> <right paren> ]
| NATIONAL CHAR [ <left paren> <length> <right paren> ]
| NCHAR [ <left paren> <length> <right paren> ]
| NATIONAL CHARACTER VARYING <left paren> <length> <right paren>
| NATIONAL CHAR VARYING <left paren> <length> <right paren>
| NCHAR VARYING <left paren> <length> <right paren>
| <national character large object type>
<national character large object type> ::=
NATIONAL CHARACTER LARGE OBJECT [ <left paren> <large object length> <right paren> ]
| NCHAR LARGE OBJECT [ <left paren> <large object length> <right paren> ]
| NCLOB [ <left paren> <large object length> <right paren> ]
<binary large object string type> ::=
BINARY LARGE OBJECT [ <left paren> <large object length> <right paren> ]
| BLOB [ <left paren> <large object length> <right paren> ]
<numeric type> ::=
<exact numeric type>
| <approximate numeric type>
<exact numeric type> ::=
NUMERIC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
| DECIMAL [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
| DEC [ <left paren> <precision> [ <comma> <scale> ] <right paren> ]
| SMALLINT
| INTEGER
| INT
| BIGINT
<precision> ::=
<unsigned integer>
<scale> ::=
<unsigned integer>
<approximate numeric type> ::=
FLOAT [ <left paren> <precision> <right paren> ]
| REAL
| DOUBLE PRECISION
<boolean type> ::=
BOOLEAN
<datetime type> ::=
DATE
| TIME [ <left paren> <time precision> <right paren> ] [ <with or without time zone> ]
| TIMESTAMP [ <left paren> <timestamp precision> <right paren> ] [ <with or without time zone> ]
<with or without time zone> ::=
WITH TIME ZONE
| WITHOUT TIME ZONE
<interval type> ::=
INTERVAL <interval qualifier>
<row type> ::=
ROW <row type body>
<row type body> ::=
<left paren> <field definition> [ { <comma> <field definition> } ... ] <right paren>
<field definition> ::=
<field name> <data type>
<field name> ::=
<identifier>
<reference type> ::=
REF <left paren> <referenced type> <right paren> [ <scope clause> ]
<referenced type> ::=
<path-resolved user-defined type name>
<scope clause> ::=
SCOPE <table name>
<collection type> ::=
<array type>
| <multiset type>
<array type> ::=
<data type> ARRAY [ <left bracket or trigraph> <maximum cardinality> <right bracket or trigraph