Search:     Advanced search
Browse by category:
C/C++   |   Java   |   Oracle/Database   |   SAP   |   ASP .NET   |   Mainframe-DB2   |   Freshers

What are Ranking Functions?

Add comment
Views: 47
Votes: 0
Comments: 0
Ranking functions return a ranking value for each row in a partition. All the ranking functions are non-deterministic. Different Ranking functions are:

ROW_NUMBER () OVER ([<partition_by_clause>] <order_by_clause>)
Returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition.

RANK () OVER ([<partition_by_clause>] <order_by_clause>)
Returns the rank of each row within the partition of a result set.

DENSE_RANK () OVER ([<partition_by_clause>] <order_by_clause>)
Returns the rank of rows within the partition of a result set, without any gaps in the ranking. (Read More Here )
Others in this Category
document Q: What is pseudo columns ? Name them?
document Q: When do you use WHERE clause and when do you use HAVING clause?
document What is Log Shipping?
document What are the difference between clustered and a non-clustered index?
document What are the Advantages of using CTE?
document What is Filtered Index?
document What is Difference between Function and Stored Procedure?
document What is View?
document What are different types of Collation Sensitivity?
document What is SQLCMD?
» More articles



RSS