> What are these constructs suppose to do?

  x <op> all (select y from t where ...)

is equivalent to

  not exists (select y from t where not (x <op> y) and ...)

Any and some are synonyms.

  x <op> any (select y from t where ...)

is equivalent to

  exists (select y from t where x <op> y and ...)

Any can be confusing because of its ambiguity in the English
language. If I say 'Is x greater than any y in t?', almost
everyone will say the answer is yes if x is greater than one
or more y-values in t -- but if I say 'x is greater than any
y in t', you may interpret that to mean that x is greater
than every y-value in t. This has lead any and all to be
deprecated for new code in some circles.

Regards

Reply via email to