Re: select statement

From: David J. Hughes (bambi@hughes.com.au)
Date: Wed Oct 06 1999 - 22:17:17 EST


On Fri, 1 Oct 1999 Olaf.Lange@schering.de wrote:

> If I have two tables A and B where
>
> Table A has two fields
> id int
> name char
>
> and
>
> Table B has two fields
> id int
> name char
>
> Is there a possiblity to do a select like the following:
>
> SELECT name.A AND name.B WHERE id.A=id.B AND (name.A = foo OR name.A=foo2)
> ?

Yup, you'd use

        SELECT A.name, B.name
        FROM A, B
        WHERE A.id = B.id
        AND (A.name = 'foo' OR B.name = 'foo2')

Bambi
...

-------------------------------------------------------------------------
To unsubscribe, go to http://www.Hughes.com.au/extras/email/



This archive was generated by hypermail 2b30 : Mon Mar 04 2002 - 09:03:51 EST