ODBC Minimum SQL Grammar

The WMI ODBC adapter supports a subset of the ODBC minimum SQL grammar. It does not support data definition language (DDL) constructs and writeable data manipulation language (DML) constructs. If the data provider supports queries, the adapter decomposes the ODBC minimum SQL into a series of WMI Level 1 queries, and then passes the queries to the data provider. Thus, queries can be optimized for specific data providers.

The following table lists SELECT statement grammar (minimum level ODBC SQL conformance).

select-statement ::=

FROM table-reference-list

[WHERE search-condition]


select-list ::=
* | select-sublist[,select-sublist]
select-sublist ::=
Expression ::=
Term|expression {+|-} term
term ::=
Factor | term {*|/} factor
factor ::=
[+|-] primary
primary ::
Column-name |

Dynamic-parameter |

Literal |


dynamic-parameter :=

The parameter is dynamic which means that the value is not specified when the statement is created. Instead, the statement has a question mark (?) as a placeholder for each dynamic parameter. Dynamic parameters are permitted only in prepared statements and must have values specified before the prepared statement is executed.

literal ::=
character-string-literal ::=
character ::=
Character set being used
column-name ::=
column-identifier ::=
user-defined-name ::=
table-reference-list ::=
table-reference ::=
table-name ::=
table-identifier | table-identifier aliasname
table-identifier ::=
table-name | table-name aliasname
search-condition ::=
Boolean-term [OR search-condition]
Boolean-term ::=
Boolean-factor [AND Boolean-term]
Boolean-factor ::=
Boolean-primary ::=
predicate | (search-condition)
predicate ::=
comparison-predicate |

like-predicate |


Comparison-predicate ::=
expression comparison-operator expression
Comparison-operator ::=
like-predicate ::=
Expression [NOT] LIKE
pattern-value ::=
Character-string-literal | dynamic-parameter
null-predicate ::=
Column-name IS [NOT] NULL
order-by-clause ::=
ORDER BY sort-specification[,sort-specification]
sort-specification ::=
{unsigned-integer | column} [ASC |DESC]


Note  For more information about support and installation of this component on a specific operating system, see Operating System Availability of WMI Components.