adspace


What are the differences between “row_number()”, “rank()” and “dense_rank()”?

Answer Posted / Sandeep Kumar Shukla

Row_number() assigns a unique number to each row in a result set, regardless of any duplicates. Rank() assigns a rank to each distinct value, with ties assigned the same rank and a sequence number added to distinguish them. Dense_rank() is similar to rank(), but it does not have gaps in the sequence numbers when there are ties.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List the ways in which dynamic sql can be executed?

1087


What is subquery? Explain the properties of a subquery?

1063


What are the source of constraints?

1010


What is a scheduled job or what is a scheduled task?

1040


How can we solve concurrency problems?

1123


List out the different types of locks available in sql server?

1051


Can one drop a column from a table?

1091


What are the different SQL Server Versions you have worked on?

1080


What are different types of constraints?

1002


How to connect php with different port numbers?

1191


What are the kinds of subquery?

1109


Explain “row_number()” in sql server with an example?

1080


Can we do dml on views?

1039


How efficient you are in oracle and SQL server?

1258


what is the difference between openrowset and openquery?

1197