Syntaxis elementen in (ODBC) SQL opdrachten

De volgende elementen worden gebruik in de eerder beschreven SQL opdrachten.

base-table-identifier ::= user-defined-name

base-table-name ::= base-table-identifier

boolean-factor ::= [NOT] boolean-primary

boolean-primary ::= comparison-predicate | ( search-condition )

boolean-term ::= boolean-factor [AND boolean-term]

character-string-literal ::= ''{character}''
(character kan elk teken zijn in de karakterset van de driver/data source. Om een aanhalingsteken ('') in een character-string-literal op te nemen dienen er twee aanhalingstekens ("") vermeld te worden.)

column-identifier ::= user-defined-name

column-name ::= [table-name.]column-identifier

comparison-operator ::= < | > | <= | >= | = | <>

comparison-predicate ::= expression comparison-operator expression

data-type ::= character-string-type

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

dynamic-parameter ::= ?

expression ::= term | expression {+|–} term

factor ::= [+|]primary

insert-value ::=
     dynamic-parameter
     | literal
     | NULL
     | USER

letter ::= lower-case-letter | upper-case-letter

literal ::= character-string-literal

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

order-by-clause ::=    ORDER BY sort-specification [, sort-specification]...

primary ::= column-name
     | dynamic-parameter
     | literal
     | ( expression )

search-condition ::= boolean-term [OR search-condition]

select-list ::= * | select-sublist [, select-sublist]...

select-sublist ::= expression

sort-specification ::= {unsigned-integer | column-name} [ASC | DESC]

sort-specification-list ::= sort-specification [, sort-specification]...

table-identifier ::= user-defined-name

table-name ::= table-identifier

table-reference ::= table-name

table-reference-list ::= table-reference [,table-reference]

term ::= factor | term {*|/} factor

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 | _]...