这句selec态t row_number() ove来自r (order by ProductID asc) as RowIn360问答dex, 不明白
的有关信息介绍如下:问题补充说明:select row_number() over (order by ProductID asc) as RowIndex, p.ProductID, p.ProductName, p.CategoryID, p.Unit, p.UnitPrice, p.Quantity from Products as p where CategoryID = @CategoryID; 这句select row_number() over (order by ProductID asc) as RowIndex, 不明白
这个是Oracle中比较常见的用法。
[TEST2@orcl#19-4月-11]SQL>select*froma;
DTIMERCOUNT
越概如似季足而降写--------------------
20110111012
20110111013
[TEST2@orcl#19-4月-11]SQL>selectrow_number()over(orderbydtime)asrowseq,dtime,rcountfroma;
ROWSEQDTIMERCOUNT
------------------------------
120110111013
220和视分跟原联密食110111012
主要用愿强误农助于查询数据的时候显示序号。
over是O肥培肉很南县川建racle的开窗函数。
over(orderbydtime)就是按照dtime排序并进行累加。对什么累加呢?就是前面的row_numbe调卷装静限政r()系统函数。
你可以再试试sum(列)over(partitionbyidorderbysalary)等可以求工资的累加和。