Skip to content

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:

NameSyntaxDescription
SELECT & FROMSELECT {field} FROM {query target}Select fields to return from a specified query target.
SHOWSHOW TARGETS|FIELDS|RELATIONSHIPSRetrieve the query target schema for a Vault.
WHEREWHERE {operator} {value}Apply search filters and narrow results.
FINDFIND ('{search phrase}')Search fields for specific search terms.
ORDER BYORDER BY {field} ASC|DESCSets the sort order of query results.
MAXROWSMAXROWS {number}Set the maximum number of results to retrieve.
SKIPSKIP {number}Set the number of results to skip.
PAGESIZEPAGESIZE {number}Limits the number of query results per page.
PAGEOFFSETPAGEOFFSET {number}Display results in multiple pages.
ASAS {alias}Define an optional alias for a field or function.