Use the ALL condition in conjunction with a comparison operators to compare a single value to the data values produced by the subquery.
expression compare [ NOT ] ALL ( subquery )
compare: = | > | < | >= | <= | <> | != | !< | !>
UltraLite uses the specified comparison operator to compare the test value to each data value in the result set. If all of the comparisons yield TRUE results, the ALL test returns TRUE.
Find the order and customer IDs of those orders placed after all products of order #2001 were shipped.
SELECT ID, CustomerID FROM SalesOrders WHERE OrderDate > ALL ( SELECT ShipDate FROM SalesOrderItems WHERE ID=2001); |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |