At 10:55 AM 5/20/01 -0700, Stephan Szabo wrote:
> Can the IN always get written as a
>join and is it always better to do so?
Nope:
openacs4=# select 1 in (1,2,3);?column?
----------t
(1 row)
You might also do something like
"select count(*) from foo where foo.state in ('rejected', 'banned');"
A better question, I guess, is if it is always better to write
it as a join if the left hand operand is a table column and
the right hand operand a rowset.
- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.