How to get Row Number with the result of SQL select query


How to get Row Number with the result of SQL select query

How to get Row Number with the result of SQL select query?
Row Number concept not available in SQL Server 2000.its introduced in SQL Server 2005.
The syntax of Row Number is

ROW_NUMBER () OVER ([] )

Example of Row Number is


SELECT ROW_NUMBER() OVER (ORDER BY FieldName ASC) AS ROWNO, * FROM Table_Name


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: