Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: SOME and WAY Quantifiers


Message #1 by "Bab Tools" <babtools@h...> on Mon, 21 Oct 2002 20:52:12
I've never heard of the WAY function.

There is a SOME operator (and the equivalent ANY and related ALL operators)
that can be used with subquery expressions in (e.g.) a WHERE clause.  A
single value is compared to a subquery.  If the subquery has at least one
entry which satisfies the comparison with the quantifier SOME (ANY), then
the expression is true.  This in effect ORs the operand with each resultant
row of the subquery, and if any comparison is TRUE, the expression evaluates
to true.  ALL works by in effect ANDing each comparison of the subquery's
resultant row, and if any are false, the entire expression evaluates to
false.

The SOME/ANY can always be replaced by the EXISTS or IN operators, and I
think is easier to read.

--
Jeff Mason			Custom Apps, Inc.
Jeff@c...

-----Original Message-----
From: Bab Tools [mailto:babtools@h...]
Sent: Monday, October 21, 2002 8:52 PM
To: sql language
Subject: [sql_language] SOME and WAY Quantifiers


Hi,

Could someone please tell me how the Quantifiers SOME and WAY work? An
example or two would be nice.

Thanks
Babs


  Return to Index