I\'m working on a small project in which I\'ll need to select a record from a temporary table based on the actual row number of the record.
How can I select a record
This will give you the rows of the table without being re-ordered by some set of values:
SELECT ROW_NUMBER() OVER (ORDER BY (SELECT '1')) AS RowID, * FROM #table