Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
If you have the ability to change it, you may want to consider moving away from the 36 digit alphanumeric created by GUID() as a Key. This is often misused in SQL-Server by developers who have not had proper training/education in SQL Server and or RDBMS. The GUID() is not intended to be a...
SELECT ROW_NUMBER() OVER(ORDER BY [col_1]) as RowNumber,COUNT([col_1]) OVER () AS RecordCount,* FROM TableName