Home Forums Programming General Need a Set-based way of number rows RE: Need a Set-based way of number rows

  • if you have a unique key in the results then yes

    USE PUBS

    SELECT ( SELECT COUNT(*) FROM Titles T2 WHERE T1.Title_id <= T2.Title_id) As RowNo , *

    FROM Titles T1

    ORDER BY 1

    but try this on a bigger table , and it will probably kill your server .. stick to the temporary table if you can