|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Rownumber() Over....
I was curious as to what this exactly means:
ROWNUBMER() OVER.... can someone please explain to me what this does? I really cannot find anything on the web that explains this and i understand thanks a lot |
|
#2
|
||||
|
||||
|
ROW_NUMBER() OVER tells DB2 how you want the rows numbered. If you are selecting Employee data, telling it to ROW_NUMBER() OVER (ORDER BY SALARY DESC) would have the row with the highest SALARY as #1, the second highest as #2, etc.
Select the exact same data with ROW_NUMBER() OVER (ORDER BY LASTNAME) would have a person with a LASTNAME starting with 'A' as #1 and someone with 'Z' as the very last. |
|
#3
|
||||
|
||||
|
For more information about this search for olap.
|
![]() |
| Viewing: Dev Shed Forums > Databases > DB2 Development > Rownumber() Over.... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|