Just Code‎ > ‎

TSQL - How to get row numbers for selected rows

posted Feb 14, 2010, 3:47 AM by Peter Henell

WITH Customer AS (

SELECT *, ROW_NUMBER() OVER (ORDER BY CustomerID) AS RowNumber

FROM cus_Customer

)

SELECT *

FROM Customer

WHERE RowNumber = 2
Comments