At 11:29 AM 9/21/00 +1000, you wrote: >The main reason I use them is to find the 'next' or 'previous' record in a >list (eg. next date, next ID). eg. > > select <whatever>, (select ID from table where id > this.id > order by id asc limit 1) as next_id ... Doesn't this give the same result (without order by): > select <whatever>, (select min(ID) from table where id > this.id) as next_id Frank
- [Fwd: Re: [SQL] no ORDER BY in subselects?] Josh Berkus
- Re: [Fwd: Re: [SQL] no ORDER BY in subselects?... Louis-David Mitterrand
- Re: [Fwd: Re: [SQL] no ORDER BY in subselects?... Philip Warner
- Re: [Fwd: Re: [SQL] no ORDER BY in subsele... Frank Bax
- Re: [Fwd: Re: [SQL] no ORDER BY in sub... Philip Warner
- Re: [Fwd: Re: [SQL] no ORDER BY in subsele... Josh Berkus