Clauses
The basic structure of a VQL query is a SELECT statement with a FROM clause. You can filter and sort the results with additional clauses such as WHERE and ORDER BY.
You can add the following clauses to a VQL query:
| Name | Syntax | Description |
|---|---|---|
| SELECT & FROM | SELECT {field} FROM {query target} | Select fields to return from a specified query target. |
| SHOW | SHOW TARGETS|FIELDS|RELATIONSHIPS | Retrieve the query target schema for a Vault. |
| WHERE | WHERE {operator} {value} | Apply search filters and narrow results. |
| FIND | FIND ('{search phrase}') | Search fields for specific search terms. |
| ORDER BY | ORDER BY {field} ASC|DESC | Sets the sort order of query results. |
| MAXROWS | MAXROWS {number} | Set the maximum number of results to retrieve. |
| SKIP | SKIP {number} | Set the number of results to skip. |
| PAGESIZE | PAGESIZE {number} | Limits the number of query results per page. |
| PAGEOFFSET | PAGEOFFSET {number} | Display results in multiple pages. |
| AS | AS {alias} | Define an optional alias for a field or function. |