Function : ROW_NUMBER
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ROW_NUMBER
is ANSI SQL-99 Function.
ROW_NUMBER is same as RANK except in the event of a tie. ROW_NUMBER does not report duplicate values ,unlike RANK.
Following is the result of the RANK function:
SELECT EMPLOYEEID,departmentno,salary,RANK() OVER (ORDER BY salary desc) from employee2;
Note
that ties produce the same ranking number however their positions are counted
against subsequent rankings.
Following
is the result of the using ROW_NUMBER:
SELECT EMPLOYEEID,departmentno,salary,ROW_NUMBER()
OVER (ORDER BY salary desc) from employee2;
Note that even case of tie ROW_NUMBER assigns values sequentially. |
Blog Archive
-
►
2012
(22)
- ► January 2012 (21)
- ► February 2012 (1)
-
▼
2013
(119)
- ► February 2013 (2)
- ► March 2013 (28)
- ► April 2013 (48)
- ► September 2013 (16)
- ► October 2013 (3)
-
▼
November 2013
(13)
- 7.1 Teradata Parallel Transporter Export Operator ...
- 7.2 Teradata Parallel Transporter - Export Operato...
- 7.3 Teradata Parallel Transporter - Export Operato...
- 8.1 Teradata Parallel Transporter - SQL selector O...
- 8.2 Teradata Parallel Transporter - SQL selector -...
- 8.3 Teradata Parallel Transporter - SQL selector o...
- 9.1 Teradata Parallel Transporter - Load Operator ...
- 9.2 Teradata Parallel Transporter - Load Operator ...
- 9.3 Teradata Parallel Transporter - Load Operator ...
- 10.1 Teradata Parallel Transporter - SQL inserter ...
- 10.2 Teradata Parallel Transporter - SQL inserter ...
- 11.1 Teradata Parallel Transporter - Stream Operat...
- 11.2 Teradata Parallel Transporter - Stream Operat...
Showing posts with label teradata ROW_NUMBER. Show all posts
Showing posts with label teradata ROW_NUMBER. Show all posts
Sunday, 28 April 2013
Teradata ROW_NUMBER
Subscribe to:
Posts (Atom)