Thursday, April 21, 2011

Rank functions in SQL.

Try use the rank functions RANK(),ROW_NUMBER(),NTILE() effectively to get the results from SQL. They are a great source for variety of sql results.

From my experience they are mainly used in the scenarios of duplicates, fetch the last row , assgin unique numbers to each row in the table. CTE comes in effective with these functions. They really have a great importance in various SQL results . Believe me . Will come up with examples soon.

No comments:

Post a Comment