Christian Heimes wrote: [D'Arcy J.M. Cain had written:] > > SELECT * FROM NumberOfPets > > WHERE name IN (SELECT name FROM CatLovers) OR > > name IN (SELECT name FROM DogLovers) > > ORDER BY name; > > A good way is to use SQL with JOINs instead of horrible nested > selects.
Do show us your join that makes D'Arcy's nested select horrible by comparison. > Although SQL is declarative, you shouldn't make the work of the query > optimizer so hard. You're not doing the query optimizer any favors. It can normalize the query to the same thing either way, so we might as well write it to be readable by people. I can read D'Arcy's at a glance. -- --Bryan Olson -- http://mail.python.org/mailman/listinfo/python-list