Fetch Alternate Rows

How to fetch alternate rows from the table?

Questions by priaa_7

Showing Answers 1 - 5 of 5 Answers

karthikeyan

  • Sep 22nd, 2011
 

--Use this Script in SqlServer

Select * from (Select *,Row_number()over(Order by Sno) as Row From TableName)A
Where (Row%2)<>0

  Was this answer useful?  Yes

Millar

  • Jul 26th, 2012
 

Code
  1. span style="font-style: italic;">--to find even rows in a table

  2. --to find even rows in a table

  3. --to find odd rows in a table

  Was this answer useful?  Yes

Ram

  • Feb 6th, 2013
 

Code
  1.  

  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