Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL problem. HELP!
my $0.02: take closer look at >= and < signs in this query, you're getting top NN+1.
Arnold Jones (moores_at_sequent.com) wrote:
: Jerry,
: The traditional way to find the highest NN rows in a table is:
: select col1,col2 from tab1 t where NN >= (select count(*) from tab1 tt
: where t.col2 < tt.col2);
: Regards,
: AJ.
: Jerry Glass wrote:
: >
: > I am lookin for a way to solve a problem. I need to find the highest
: > values in a list and only return those values (i.e., find the three
: > highest values and only return those three rows)
-- -Sergey.Received on Mon Jun 23 1997 - 00:00:00 CDT
![]() |
![]() |