Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Optimizing SELECT Query
You could do.
select max(C) from T where C < N
-- Steve Rainbird Principal consultant MSS International Ltd. www.mssint.com Remove "nospam" from email address to reply "Carsten Grammes" <cgrammes_at_gmx.net> wrote in message news:3d22f8f6.434884701_at_gandalf.dialogika.de...Received on Wed Jul 03 2002 - 09:32:39 CDT
> Hello world,
>
> following situation: I have a table T with a column C (C are numbers).
> I want to find the number which is smaller but nearest to a given
> value N.
>
> How to formulate this as a select statement in an efficient way?
>
> Thanks,
> Carsten.
>
>
> ---
> I want to die peacefully in sleep like my grandfather.
> Not screaming in terror like his passengers!