SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - SQL Server 2005/Yukon
 Finding the nth row in a table using sqlserver 2005
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

AskSQLTeam
Ask SQLTeam Question

USA
0 Posts

Posted - 01/19/2006 :  08:36:27  Show Profile  Visit AskSQLTeam's Homepage
suneel writes "How to find the nth row in a table using sqlserver 2005"

madhivanan
Premature Yak Congratulator

India
22772 Posts

Posted - 01/19/2006 :  09:01:23  Show Profile  Send madhivanan a Yahoo! Message
One of the methods
Select min(col) from
(
	Select Top N col from yourTable Order by col DESC
) T

Also you need to define what nth row means in your case


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

deostroll
Starting Member

India
1 Posts

Posted - 02/25/2007 :  01:57:12  Show Profile  Visit deostroll's Homepage  Send deostroll a Yahoo! Message
But what we had a non-relational table?
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

USA
7020 Posts

Posted - 02/25/2007 :  02:26:12  Show Profile
quote:
Originally posted by deostroll

But what we had a non-relational table?



Who cares? It's just a job interview question.


CODO ERGO SUM
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30282 Posts

Posted - 02/25/2007 :  07:48:54  Show Profile  Visit SwePeso's Homepage
And where is the "relational" thingies with Madhis suggestion?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000