Rownum in SQL Server

Posted by Derek Dieter on SQL Server Planet See other posts from SQL Server Planet or by Derek Dieter
Published on Sun, 13 Jun 2010 18:53:57 +0000 Indexed on 2010/06/13 18:54 UTC
Read the original article Hit count: 248

Filed under:
Prior to SQL Server 2005, there was no inherent function to generate a rownumber within a row. There is a workaround however for SQL 2000. If you are on SQL 2005+, then you will utilize the following function:-- SQL 2005+ SELECT RowNumber = ROW_NUMBER() OVER (ORDER BY c.CustomerID ASC) [...]

© SQL Server Planet or respective owner

Related posts about OracleEquivalents