LEFT JOINing a table you are already SELECTing

2001-02-21 Thread Graeme B. Davis
Is it possible to have the following situation: Schema: id first last optional_id I want to do a select like this: SELECT D.id, D.first, D.last, D.optional_id, db1.first, db1.last FROM db1 AS D LEFT JOIN db1 ON D.optional_id=db1.id; and have it return: |id|first|last|optional_id|first|last|

Re: LEFT JOINing a table you are already SELECTing

2001-02-21 Thread Gerald L. Clark
"Graeme B. Davis" wrote: > > Is it possible to have the following situation: > > Schema: > > id > first > last > optional_id > > I want to do a select like this: > > SELECT D.id, D.first, D.last, D.optional_id, db1.first, db1.last > FROM db1 AS D > LEFT JOIN db1 ON D.optional_id=db1.id; > >