ROW_NUMBER() Function - SQL Server

Example

SELECT ROW_NUMBER() OVER (ORDER BY EMPID ASC) AS ROWID, * FROM EMPLOYEE

Notes