What is the difference between row_number and dense_rank?
Answer / Tarkeshwar Prasad
'ROW_NUMBER' assigns a unique number to each row in a result set, regardless of gaps or overlaps. 'DENSE_RANK', on the other hand, assigns sequential numbers without gaps if there are no duplicate values. If duplicates exist, it skips over them. For example: SELECT ROW_NUMBER() OVER (ORDER BY OrderDate) as RowNum,n DENSE_RANK() OVER (ORDER BY OrderDate) as Rank FROM Orders;
| Is This Answer Correct ? | 0 Yes | 0 No |
What are relationships and mention different types of relationships in the dbms
Why do we use trigger?
What are different types of raid levels?
how many no of arguments can be passed in procedures and functions
What are the differences between having and where clause.
Explain full-text indexing?
What is logshipping and its purpose?
Is it ok to shrink transaction log?
What is the Disadvantage of indexed sequential file.
Tell me what are the essential components of sql server service broker?
do you know what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration
What is the difference between cube operator and rollup operator? : SQL Server Architecture
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)