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

LINQ: Implement NOT IN tables with LINQ to Entity

SQL: Conditional Where Clause