Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return 2nd row in a table using select statement

Status
Not open for further replies.

DLTaylor

MIS
Joined
Dec 17, 2003
Messages
51
Location
GB
I have a table where I need to only want to return the 2nd row no matter what the values contained within the row.
Is there a simple way to do this?

Thanks

 
Nth row" makes sense only with respect to the values in a certain column

for example, here's the row with the 2nd highest qux value:
Code:
select foo
     , bar
     , qux
  from daTable
 where qux =
       ( select max(qux)
           from daTable
          where qux <
                ( select max(qux)
                    from daTable ) )


r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top