On Sat, 29 May 2010 13:45:37 -0700 (PDT)
Bryan wrote:
> 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.
Assuming that you are running a decent *cou
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 joi
Finally, are these SQL databases? The best way of getting information
is with SQL.
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.
Although S
D'Arcy J.M. Cain wrote:
On Thu, 27 May 2010 12:45:58 -0700
Ethan Furman wrote:
Let's say I have two tables:
CatLoversDogLovers
--- ---
| name | age | | name | age |
|-| |-|
[...]
NumberOf
Ethan Furman wrote:
Let's say I have two tables:
Okay, let's say I have three tables instead. ;p
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 27 May 2010 12:45:58 -0700
Ethan Furman wrote:
> Let's say I have two tables:
>
> CatLoversDogLovers
> --- ---
> | name | age | | name | age |
> |-| |-|
[...]
>
> NumberOfPets
> -
Let's say I have two tables:
CatLoversDogLovers
--- ---
| name | age | | name | age |
|-| |-|
| Allen | 42 | | Alexis| 7 |
| Jerod | 29 | | Michael | 21 |
| Samuel