SQL Server 2005 T-SQL includes a set of functions that let you rank the rows in your result set. SQL Server expert Robert Sheldon defines and gives examples of how to use the four ranking functions: ROW_NUMBER, RANK, DENSE_RANK and NTILE. Include one or more of these functions in your query SELECT clause and automatically assign a rank to each row in your result.
Source Click Here.
Post a Comment