Display additional column with sequential numbers in sql server
Answers
Answered by
0
Using ROW_NUMBER() (documentation)
SELECT ROW_NUMBER() OVER (ORDER BY EmpID ASC) AS No, EmpID, EmpName, Salary FROM Employee
SELECT ROW_NUMBER() OVER (ORDER BY EmpID ASC) AS No, EmpID, EmpName, Salary FROM Employee
Similar questions
English,
7 months ago
CBSE BOARD X,
7 months ago
Computer Science,
1 year ago
Business Studies,
1 year ago
History,
1 year ago