2021
02-02
02-02
PostgreSQL ROW_NUMBER() OVER()的用法说明
语法:ROW_NUMBER()OVER([PRITITIONBYcol1]ORDERBYcol2[DESC])解释:ROW_NUMBER()为返回的记录定义个行编号,PARTITIONBYcol1是根据col1分组,ORDERBYcol2[DESC]是根据col2进行排序。举例:postgres=#createtablestudent(idserial,namecharactervarying,coursecharactervarying,scoreinteger);CREATETABLEpostgres=#postgres=#\dstudentTable"public.student"Column|Type|Modifiers...
继续阅读 >