Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A Work Item Query Language (WIQL) query consists of a SELECT statement that lists the fields to be returned as columns in the result set. You can further qualify the result set by using a logical expression. You can specify a sort order. Use an ASOF clause to state that a query is evaluated as of a previous time.
Queries are not case sensitive.
Typical Query
The following typical WIQL query example uses reference names for the fields. The query selects work items where the Priority field equals 1. The query returns the ID and Title of the return set as columns. The results are sorted by ID in ascending order.
SELECT System.ID, System.Title from workitems
where Priority=1 order by System.ID asc
Examples
A query consists of a SELECT statement and a qualifying WHERE clause. The following shows the basic syntax.
SELECT |
|
The following example statements show specific qualifying clauses.
AND |
|
OR |
|
NOT |
|
EVER |
|
UNDER |
|
Sort |
|
ASOF |
|
See Also
Reference
Work Item Query Language in EBNF