Friday, September 11, 2009

Get serial no in SQL Server

Here I provide simple SQl function
Row_Number() this function is used for get the sl no of that resultset

Here is example
select Row_Number() Over(Order by id desc)as SlNo,Id,firstName,address from employee
order by id desc
Below is output:











No comments:

Post a Comment