Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » UltraLite SQL Elements Reference » Expressions in UltraLite

Aggregate expressions Next Page

Subqueries in expressions

A SELECT statement that is nested inside another SELECT statement.


A subquery is structured like a regular query.


In UltraLite, you can only use subquery references in the following situations:

You can write subqueries with references to names that are specified before (to the left of) the subquery, sometimes known as outer references to the left. However, you cannot have references to items within subqueries (sometimes known as inner references).

See also

The following subquery is used to list all product IDs for items that are low in stock (that is, less than 20 items).

FROM SalesOrderItems
   FROM Products
   WHERE Quantity < 20 )