Subject RE: [ib-support] Natural Joins and SELECT queries
Author Berenger Enselme
> -----Original Message-----
> From: Robert DiFalco [mailto:rdifalco@...]
> Sent: Monday, March 31, 2003 2:31 PM
> To: ib-support@yahoogroups.com
> Subject: RE: [ib-support] Natural Joins and SELECT queries
>
>
> Thanks Berenger. So if I had three related tables would I do this?
>
> SELECT Persistent.oid, name FROM
> Persistent JOIN NamedPersistent on
> NamedPersistent.oid=Persistent.oid,
> NamedAndDatedPersistent JOIN NamedPersistent on
> NamedPersistent.oid=NamedAndDatedPersistent.oid
> WHERE name="foo"
>

SELECT Persistent.oid, name FROM
(Persistent JOIN NamedPersistent on NamedPersistent.oid=Persistent.oid)
JOIN NamedAndDatedPersistent ON
NamedPersistent.oid=NamedAndDatedPersistent.oid
WHERE name="foo"

would probably be better !

Berenger