摘要:
--排名函数 ROW_NUMBER() RANK(), DENSE_RANK(),NTILE() Over()函数 为排名函数生成排序顺序、 select ROW_NUMBER() over(order by OrderDate) as Romber,SalesOrderID,OrderDate from SalesLT.SalesOrderHeader ---创建一个单一的排序 SELECT ROW_NUMBER() OVER(partition by year(OrderDate),Month(OrderDate) order by orderdate) as rown... 阅读全文