Thread: Re: [SQL] query to do a backward 'skip', possible with (index) optimization ?

Re: [SQL] query to do a backward 'skip', possible with (index) optimization ?

From
Alain TESIO
Date:
> > => select * from mytable where id 
> < '12345' order by id desc limit 1;
> 
> > - which returned the correct 
> result '12344', but without optimization.

Just an idea : add another column
negative_id which is equal to -id and
reverse the test ...

Alain

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com