Element
|
Mini-
mum
|
Core
|
Exten-
ded
|
SOLID
Server |
all-function ::= {AVG | MAX | MIN |
SUM} (expression)
|
|
|
|
|
approximate-numeric-literal ::=
mantissaEexponent
|
|
|
|
|
approximate-numeric-type ::=
{approximate numeric types}
(For example, FLOAT, DOUBLE PRECISION, or REAL. To determine the type name used by a data source, an application calls SQLGetTypeInfo.)
|
|
|
|
|
argument-list ::= expression |
expression, argument-list
|
|
|
|
|
base-table-identifier ::= user-defined-name
|
|
|
|
|
base-table-name ::= base-table-identifier
|
|
|
|
|
base-table-name ::= base-table-identifier |
owner-name.base-table-identifier |
qualifier-name qualifier-separator
base-table-identifier |
qualifier-name qualifier-separator
[owner-name].base-table-identifier
(The third syntax is valid only if the data source does not support owners.)
|
|
|
|
|
between-predicate ::=
expression [NOT] BETWEEN expression AND expression
|
|
|
|
|
binary-literal ::=
{implementation defined}
|
|
|
|
|
binary-type ::= {binary types}
(For example, BINARY, VARBINARY, or LONG VARBINARY. To determine the type name used by a data source, an application calls SQLGetTypeInfo.)
|
|
|
|
|
bit-literal ::= 0 | 1
|
|
|
|
|
bit-type ::= {bit types}
(For example, BIT. To determine the type name used by a data source, an application calls SQLGetTypeInfo.)
|
|
|
|
|
boolean-factor ::= [NOT] boolean-primary
|
|
|
|
|
boolean-primary ::= predicate | ( search-condition )
|
|
|
|
|
boolean-term ::= boolean-factor
[AND boolean-term]
|
|
|
|
|
character ::= {any character in the implementors character set}
|
|
|
|
|
character-string-literal :: = '{character}...'
(To include a single literal quote character (') in a character-string-literal, use two literal quote characters (' ').)
|
|
|
|
|
character-string-type ::= {character types}
(The Minimum SQL conformance level requires at least one character data type. For example, CHAR, VARCHAR, or LONG VARCHAR. To determine the type name used by a data source, an application calls SQLGetTypeInfo.)
|
|
|
|
|
column-alias ::= user-defined-name
|
|
|
|
|
column-identifier ::= user-defined-name
|
|
|
|
|
column-name ::=
[table-name.]column-identifier
|
|
|
|
|
column-name ::= [{table-name |
correlation-name}.]column-identifier
|
|
|
|
|
comparison-operator ::= < | > | <= |
>= | = | <>
|
|
|
|
|
comparison-predicate ::= expression
comparison-operator expression
|
|
|
|
|
comparison-predicate ::=
expression comparison-operator
{expression | (sub-query)}
|
|
|
|
|
correlation-name ::= user-defined-name
|
|
|
|
|
cursor-name ::= user-defined-name
|
|
|
|
|
data-type ::= character-string-type
|
|
|
|
|
data-type ::=
character-string-type |
exact-numeric-type |
approximate-numeric-type
|
|
|
|
|
data-type ::=
character-string-type |
exact-numeric-type |
approximate-numeric-type | bit-type |
binary-type | date-type | time-type |
timestamp-type
|
|
|
|
|
date-separator ::= -
|
|
|
|
|
date-type ::= {date types}
(For example, DATE. To determine the type name used by a data source, an application calls SQLGetTypeInfo.)
|
|
|
|
|
date-value ::= years-value date-separator
months-value date-separator days-value
|
|
|
|
|
days-value ::= digit digit
|
|
|
|
|
digit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
|
|
|
|
|
distinct-function ::=
{AVG | COUNT | MAX | MIN | SUM} (DISTINCT column-name)
|
|
|
|
|
dynamic-parameter ::= ?
|
|
|
|
|
empty-string ::=
|
|
|
|
|
escape-character ::= character
|
|
|
|
|
exact-numeric-literal ::= [+|]
{unsigned-integer[.unsigned-integer] |
unsigned-integer. | .unsigned-integer }
|
|
|
|
|
exact-numeric-type ::=
{exact numeric types}
(For example, DECIMAL, NUMERIC, SMALLINT, or INTEGER. To determine the type name used by a data source, an application calls SQLGetTypeInfo.)
|
|
|
|
|
exact-numeric-type ::=
{exact numeric types}
(For example, DECIMAL, NUMERIC, SMALLINT, INTEGER, and BIGINT. To determine the type name used by a data source, an application calls SQLGetTypeInfo.)
|
|
|
|
|
exists-predicate ::= EXISTS ( sub-query )
|
|
|
|
|
exponent ::= [+|] unsigned-integer
|
|
|
|
|
expression ::= term | expression {+|} term
|
|
|
|
|
factor ::= [+|]primary
|
|
|
|
|
hours-value ::= digit digit
|
|
|
|
|
index-identifier ::= user-defined-name
|
|
|
|
|
index-name ::=
[index-qualifier.]index-identifier
|
|
|
|
|
index-qualifier ::= user-defined-name
|
|
|
|
|
in-predicate ::= expression [NOT] IN
{(value {, value}...) | (sub-query)}
|
|
|
|
|
insert-value ::= dynamic-parameter | literal |
NULL | USER
|
|
|
|
|
keyword ::= (see list of reserved keywords)
|
|
|
|
|
length ::= unsigned-integer
|
|
|
|
|
letter ::= lower-case-letter | upper-case-letter
|
|
|
|
|
like-predicate ::= expression [NOT] LIKE
pattern-value
|
|
|
|
|
like-predicate ::= expression [NOT] LIKE
pattern-value [ODBC-like-escape-clause]
|
|
|
|
|
literal ::= character-string-literal
|
|
|
|
|
literal ::= character-string-literal |
numeric-literal
|
|
|
|
|
literal ::= character-string-literal |
numeric-literal | bit-literal | binary-literal |
ODBC-date-time-extension
|
|
|
|
|
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
|
|
|
|
|
mantissa ::= exact-numeric-literal
|
|
|
|
|
minutes-value ::= digit digit
|
|
|
|
|
months-value ::= digit digit
|
|
|
|
|
null-predicate ::= column-name IS [NOT]
NULL
|
|
|
|
|
numeric-literal ::= exact-numeric-literal |
approximate-numeric-literal
|
|
|
|
|
ODBC-date-literal ::=
ODBC-std-esc-initiator d 'date-value'
ODBC-std-esc-terminator |
ODBC-ext-esc-initiator d 'date-value'
ODBC-ext-esc-terminator
|
|
|
|
|
ODBC-date-time-extension ::=
ODBC-date-literal | ODBC-time-literal |
ODBC-timestamp-literal
|
|
|
|
|
ODBC-like-escape-clause ::=
ODBC-std-esc-initiator
escape 'escape-character'
ODBC-std-esc-terminator |
ODBC-ext-esc-initiator
escape 'escape-character'
DBC-ext-esc-terminator
|
|
|
|
|
ODBC-time-literal ::=
ODBC-std-esc-initiator
t 'time-value' ODBC-std-esc-terminator |
ODBC-ext-esc-initiator
t 'time-value' ODBC-ext-esc-terminator
|
|
|
|
|
ODBC-timestamp-literal ::=
ODBC-std-esc-initiator ts 'timestamp-value'
ODBC-std-esc-terminator |
ODBC-ext-esc-initiator ts 'timestamp-value'
ODBC-ext-esc-terminator
|
|
|
|
|
ODBC-ext-esc-initiator ::= {
|
|
|
|
|
ODBC-ext-esc-terminator ::= }
|
|
|
|
|
ODBC-outer-join-extension ::=
ODBC-std-esc-initiator oj outer-join
ODBC-std-esc-terminator |
ODBC-ext-esc-initiator oj outer-join
ODBC-ext-esc-terminator
|
|
|
|
|
ODBC-scalar-function-extension ::=
ODBC-std-esc-initiator fn scalar-function
ODBC-std-esc-terminator |
ODBC-ext-esc-initiator fn scalar-function
ODBC-ext-esc-terminator
|
|
|
|
|
ODBC-std-esc-initiator ::=
ODBC-std-esc-prefix SQL-esc-vendor-clause
|
|
|
|
|
ODBC-std-esc-prefix ::= --(*
|
|
|
|
|
ODBC-std-esc-terminator ::= *)--
|
|
|
|
|
order-by-clause ::= ORDER BY
sort-specification [, sort-specification]...
|
|
|
|
|
outer-join ::= table-name [correlation-name]
LEFT OUTER JOIN
{table-name [correlation-name] |
outer-join}
ON search-condition
(For outer joins, search-condition must contain only the join condition between the specified table-names.)
|
|
|
|
|
owner-name ::= user-defined-name
|
|
|
|
|
pattern-value ::= character-string-literal |
dynamic-parameter
(In a character-string-literal, the percent character (%) matches 0 or
more of any character; the underscore character (_) matches 1
character.)
|
|
|
|
|
pattern-value ::= character-string-literal |
dynamic-parameter | USER
(In a character-string-literal, the percent character (%) matches 0 or
more of any character; the underscore character (_) matches 1
character.)
|
|
|
|
|
precision ::= unsigned-integer
|
|
|
|
|
predicate ::= comparison-predicate | like-predicate | null-predicate
|
|
|
|
|
predicate ::= between-predicate |
comparison-predicate | exists-predicate |
in-predicate | like-predicate |
null-predicate | quantified-predicate
|
|
|
|
|
primary ::= column-name |
dynamic-parameter | literal | ( expression )
|
|
|
|
|
primary ::= column-name |
dynamic-parameter | literal |
set-function-reference | USER |
( expression )
|
|
|
|
|
primary ::= column-name |
dynamic-parameter | literal |
ODBC-scalar-function-extension |
set-function-reference | USER |
( expression )
|
|
|
|
|
procedure ::= procedure-name |
procedure-name (procedure-parameter-list)
|
|
|
|
|
procedure-identifier ::= user-defined-name
|
|
|
|
|
procedure-name ::= procedure-identifier |
owner-name.procedure-identifier |
qualifier-name qualifier-separator
procedure-identifier |
qualifier-name qualifier-separator
[owner-name].procedure-identifier
(The third syntax is valid only if the data source does not support owners.)
|
|
|
|
|
procedure-parameter-list ::=
procedure-parameter |
procedure-parameter,
procedure-parameter-list
|
|
|
|
|
procedure-parameter ::= dynamic-parameter |
literal | empty-string
(If a procedure parameter is an empty string, the procedure uses the default value for that parameter.)
|
|
|
|
|
qualifier-name ::= user-defined-name
|
|
|
|
|
qualifier-separator ::=
{implementation-defined}
(The qualifier separator is returned through SQLGetInfo with the SQL_QUALIFIER_NAME_SEPARATOR option.)
|
|
|
|
|
quantified-predicate ::=
expression comparison-operator
{ALL | ANY} (sub-query)
|
|
|
|
|
query-specification ::=
SELECT [ALL | DISTINCT] select-list
FROM table-reference-list
[WHERE search-condition]
[GROUP BY
column-name, [column-name]...]
[HAVING search-condition]
|
|
|
|
|
ref-table-name ::= base-table-identifier
|
|
|
|
|
ref-table-name ::= base-table-identifier |
owner-name.base-table-identifier |
qualifier-name qualifier-separator
base-table-identifier |
qualifier-name qualifier-separator
[owner-name].base-table-identifier
(The third syntax is valid only if the data source does not support owners.)
|
|
|
|
|
referenced-columns ::=
( column-identifier [, column-identifier]... )
|
|
|
|
|
referencing-columns ::=
(column-identifier [, column-identifier]... )
|
|
|
|
|
scalar-function ::=
function-name (argument-list)
(The definitions for the non-terminals function-name and function-name (argument-list) are derived from the list of scalar functions in Appendix F, "Scalar Functions.")
|
|
|
|
|
scale ::= unsigned-integer
|
|
|
|
|
search-condition ::=
boolean-term [OR search-condition]
|
|
|
|
|
seconds-fraction ::= unsigned-integer
|
|
|
|
|
seconds-value ::= digit digit
|
|
|
|
|
select-list ::=
* | select-sublist [, select-sublist]...
|
|
|
|
|
select-sublist ::= expression
|
|
|
|
|
select-sublist ::=
expression [[AS] column-alias] |
{table-name | correlation-name}.*
|
|
|
|
|
set-function-reference ::= COUNT(*) |
distinct-function | all-function
|
|
|
|
|
sort-specification ::=
{unsigned-integer | column-name }
[ASC | DESC]
|
|
|
|
|
SQL-esc-vendor-clause ::= VENDOR(Microsoft), PRODUCT(ODBC)
|
|
|
|
|
sub-query ::=
SELECT [ALL | DISTINCT] select-list
FROM table-reference-list
[WHERE search-condition]
[GROUP BY
column-name [, column-name]...]
[HAVING search-condition]
|
|
|
|
|
table-identifier ::= user-defined-name
|
|
|
|
|
table-name ::= table-identifier
|
|
|
|
|
table-name ::= table-identifier |
owner-name.table-identifier |
qualifier-name qualifier-separator
table-identifier |
qualifier-name qualifier-separator
[owner-name].table-identifier
(The third syntax is valid only if the data source does not support owners.)
|
|
|
|
|
table-reference ::= table-name
|
|
|
|
|
table-reference ::=
table-name [correlation-name]
|
|
|
|
|
table-reference::=
table-name [correlation-name] |
ODBC-outer-join-extension
(A SELECT statement can contain only one table-reference that is an ODBC-outer-join-extension.)
|
|
|
|
|
table-reference-list ::=
table-reference [,table-reference]
|
|
|
|
|
term ::= factor | term {*|/} factor
|
|
|
|
|
time-separator ::= :
|
|
|
|
|
time-type ::= {time types}
(For example, TIME. To determine the type name used by a data source, an application calls SQLGetTypeInfo.)
|
|
|
|
|
time-value ::=
hours-value time-separator
minutes-value time-separator
seconds-value
|
|
|
|
|
timestamp-separator ::=
(The blank character.)
|
|
|
|
|
timestamp-type ::= {timestamp types}
(For example, TIMESTAMP. To determine the type name used by a data source, an application calls SQLGetTypeInfo.)
|
|
|
|
|
timestamp-value ::=
date-value timestamp-separator
time-value[.seconds-fraction]
|
|
|
|
|
unsigned-integer ::= {digit}...
|
|
|
|
|
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
|
|
|
|
|
user-defined-name ::=
letter[ digit | letter| _ ]...
|
|
|
|
|
user-name ::= user-defined-name
|
|
|
|
|
value ::= literal | USER | dynamic-parameter
|
|
|
|
|
viewed-table-identifier ::= user-defined-name
|
|
|
|
|
viewed-table-name ::=
viewed-table-identifier |
owner-name.viewed-table-identifier |
qualifier-name qualifier-separator
viewed-table-identifier |
qualifier-name qualifier-separator
[owner-name].viewed-table-identifier
(The third syntax is valid only if the data source does not support owners.)
|
|
|
|
|
years-value ::= digit digit digit digit
|
|
|
|
|