SQL: Getting rownumber

Suppose you have List of record from a table and you need the rownumber for each row you can use this below query:

row_number() OVER (ORDER BY [Project2].[case_no] ASC) AS [row_number]

Comments

Popular posts from this blog

LINQ: Using int.TryParse() within a LINQ where clause

IIS: Publish Project to remote IIS with Web Deploy.

ASP.Net MVC: Configuring asp.net session state in SQL Server.