Programmer Guide : Minimum SQL grammar requirements for ODBC : SQL statements
  
SQL statements
This section describes the subset of SQL statements and elements.
create-table-statement ::=
  CREATE
TABLE base_table_name
  (column_identifier data_type [,
      column_identifier data_type]...)
Important As the data_type in a create_table_statement, applications require a data type from the TYPE_NAME column of the result set returned by SQLGetTypeInfo.
delete_statement_searched ::=
    DELETE FROM table_name [WHERE search_condition]
drop_table_statement ::=
    DROP TABLE base_table_name
select_statement ::=
    SELECT [ALL | DISTINCT] select_list
    FROM table_reference_list
    [WHERE search_condition]
    [order_by_clause]
statement ::= create_table_statement |
    delete_statement_searched |
    drop_table_statement |
    insert_stetement |
    select_statement |
    update_statement_searched
Update_statement_searched ::=
    UPDATE table_name
    SET column_identifier = {expression |
        NULL}
    [, column_identifier = {expression |
        NULL}]...
    [WHERE search_condition]
SQL statement elements
base_table_identifier ::= user_defined_name
base_table_name ::= base_table_identifier
boolean_factor ::= [NOT] boolean_primary
boolean_primary ::= predicate | ( search_condition )
boolean_term ::= boolean_factor [AND boolean_term]
character_string_literal :: = "{character}..."
character is any character in the character set of the driver/data source. To include a single literal quote character (') in a character_string_literal, use two literal quote characters ("").
column_identifier ::= user_defined_name
column_name ::= [table_name.]column_identifier
comparison_operator ::= < | > | <= | >= | = | <>
comparison_predicate ::= expression comparison_operator expression
data_type ::= character_string_type
character_string_type is any data type for which the ""DATA_TYPE"" column in the result set returned by SQLGetTypeInfo is either SQL_CHAR or SQLVARCHAR.)
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_list cannot contain parameters.)
select_sublist ::= expression
sort_specification ::= {unsigned_integer | column_name } [ASC | DESC]
table_identifier ::= user_defined_name
table_name ::= table_identifier
table_reference ::= table_name
table_reference ::= table_name [,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| _ ]...
See also
Control statements (logical condition)
Minimum SQL grammar requirements for ODBC