SQL ROW NUMBER
SELECT ROW_NUMBER() OVER(ORDER BY name ASC) AS Row#
SELECT ROW_NUMBER() OVER(ORDER BY name ASC) AS Row#, name, recovery_model_desc FROM sys.databases WHERE database_id < 5;
SELECT ROW_NUMBER() OVER(ORDER BY name ASC) AS Row#
SELECT ROW_NUMBER() OVER(ORDER BY name ASC) AS Row#, name, recovery_model_desc FROM sys.databases WHERE database_id < 5;