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.
expression compare [ NOT ] ANY ( subquery )
expression = ANY ( subquery )
compare: = | > | < | >= | <= | <> | != | !< | !>
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.
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);
|Envoyer votre avis sur cette page par email.||Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|