2024-11-06 13:38:55
select a.* from
(select row_number()over(partition by id order by 排序字段) as num,*
from [table] )a where num<=3
请采纳,谢谢
[SQL]select a.* from
(select row_number()over(partition by MENU_PARENTID order by MENU_PARENTID) as num,*
from DL_MENU )a where num<=3
[Err] ORA-00936: missing expression
select a.* from
(select row_number()over(partition by menu_parentid order by menu_parentid) as num,t.*
from DL_MENU t)a where num<=3