SQL running serial generating tips:
Traditionally developers and Database administrators used temporary tables and co-related sub-queries to generate calculated row numbers in a query. Now SQL Server 2005 provides a function, which replaces all of the additional resources we used to generate row numbers.
Returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition.
Example:
select ROW_NUMBER() OVER(ORDER BY CLM1),* from Table1
Remark:
Filed under: SQL ROW_NUMBER | Tagged: Generate Row number, Microsoft SQL server, MSSQL, MSSQL server, ROW_NUMBER(), SQL help, SQL ROW_NUMBER, SQL running serial, SQL running serial generating, SQL Server, SQL Tricks, sqlhelp, SQLtips | Leave a comment »