Solaris WBEM Developer's Guide

WHERE Clause

The WHERE clause narrows the scope of a query. This clause contains a conditional expression, that can contain a property or key word, an operator, and a constant.

The syntax for a WHERE clause appended to a SELECT statement is as follows:

SELECT CIMinstance FROM CIMclass WHERE conditional_expression

The conditional_expression in the WHERE clause takes the following form:

 
property operator constant

The expression is composed of a property or key word, an operator, and a constant. You can append the WHERE clause to the SELECT statement using one of the following forms:

SELECT instance FROM class WHERE constant operator property

Valid WHERE clauses follow these rules:

Standard WQL Operators for WHERE Clauses

You can use the following standard WQL operators for a binary expression in the WHERE clause of a SELECT statement.

Table 5–4 WQL Operators for WHERE Clauses

Operator 

Description 

Equal to 

Less than 

Greater than 

<= 

Less than or equal to 

>= 

Greater than or equal to 

<> 

Not equal to