Yes, We can select serial number / record number with our selected result from sql server , Its very easy , here is the code
Department ,
EmployeeCode,
EmployeeName
FROM EmployeeMaster
WHERE Active = 1
Here I used ROW_NUMBER() function to get serial number with the ascending order of employee name. There is an option to get result order against multiple fields like this
ROW_NUMBER() OVER (ORDER BY Department ,EmployeeName) AS SlNo
No comments:
Post a Comment