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

SQL Anywhere 11.0.0 » UltraLite - Database Management and Reference » UltraLite SQL Reference » UltraLite SQL elements reference » Expressions in UltraLite » Search conditions in UltraLite

 

ANY conditions

Use the ANY condition in conjunction with a comparison operators to compare a single value to the column of data values produced by the subquery.

Syntax 1
expression compare  [ NOT ] ANY ( subquery )
Syntax 2
expression = ANY ( subquery )
Parameters
compare:
= | > | < | >= | <= | <> | != | !< | !>
Remarks

UltraLite uses the specified comparison operator to compare the test value to each data value in the column. If any of the comparisons yields a TRUE result, the ANY test returns TRUE.

Syntax 1   is TRUE if expression is equal to any of the values in the result of the subquery, and FALSE if the expression is not NULL and does not equal any of the values returned by the subquery. The ANY condition is UNKNOWN if expression is the NULL value, unless the result of the subquery has no rows, in which case the condition is always FALSE.

See also
Example

Find the order and customer IDs of those orders placed after the first product of the order #2005 was shipped.

SELECT ID, CustomerID
FROM SalesOrders
WHERE OrderDate > ANY (
 SELECT ShipDate
 FROM SalesOrderItems
 WHERE ID=2005);