ROW_NUMBER() example

CGN007
Posted by CGN007 under Sql Server category on | Points: 40 | Views : 947
ROW_NUMBER() returns the sequential number of a row starting at 1 for the first row.

Simple Example
SELECT ROW_NUMBER() OVER(ORDER BY emp_id DESC) AS Row,emp_id,emp_salary FROM employee

Comments or Responses

Login to post response