How to add serial number to a resultset

  • abu_arqam (3/24/2010)


    You can use

    SELECT ROW_NUMBER() OVER (ORDER BY ColumnName1) As SrNo,ColumnName1,ColumnName2,ColumnName3 from Tablename

    Thanks

    No, you cannot.

    It's SQL 7,2000 - TSQL forum, and ROW_NUMBER() OVER was introduced in SQL 2005.

    _____________
    Code for TallyGenerator

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply