Solaris WBEM Developer's Guide

SELECT Statement

You use the SELECT statement to retrieve instances of a single class and its subclasses. You can also specify the properties to retrieve and the conditions that must be met.


Note –

Currently, join operations are not supported.


The syntax for the SELECT statement is as follows:

SELECT list FROM class WHERE condition

The following table shows examples of using arguments in the SELECT clause to refine a search.

Table 5–3 Sample SELECT Statements

Example Query 

Description 

SELECT * FROM class

Selects all instances of the specified class and all of its subclasses. Each instance that is returned contains all the properties. 

SELECT PropertyA FROM class

Selects all instances that contain PropertyA of the specified class and all of its subclasses.

SELECT PropertyA, PropertyB FROM class WHERE PropertyB=20

Selects all instances of the specified class and all of its subclasses where PropertyB=20. Each returned instance contains only PropertyA and PropertyB.