How will you retrieve the third row of a table in ms-sql without using use of cursors and conditions?

Showing Answers 1 - 5 of 5 Answers

dhamo

  • Oct 10th, 2007
 



select * from tablename where rownum <4 minus

(select * from tablename where rownum <=2 );

try this !!!

  Was this answer useful?  Yes

hainahoo

  • Aug 18th, 2010
 

SELECT p.FirstName, p.LastName
,ROW_NUMBER() OVER (ORDER BY a.PostalCode) AS 'Row_Num'
from table_name
where Row_num=3

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions