oracle 如何在group by 的語(yǔ)句中使用rownum,實(shí)現(xiàn)分頁(yè) 貼上我的語(yǔ)句:SELECT s.calluserid,c.callsign, count(msgstatus) asalls,sum(msgstatus) as success, tochar(sendtime,'yyyy-MM-dd')FROM rtxsenddata s,rtxcalluserinfo c wheres.calluserid=c.calluserid group bys.calluserid,c.callsign,tochar(sendtime,'yyyy-MM-dd');需要對(duì)結(jié)果集分頁(yè),使用rownum,就會(huì)報(bào)錯(cuò)
1 回答

吃雞游戲
TA貢獻(xiàn)1829條經(jīng)驗(yàn) 獲得超7個(gè)贊
SELECT rownum, a.*
FROM (<<your complex query including GROUP BY and ORDER BY>>) a
- 1 回答
- 0 關(guān)注
- 1787 瀏覽
添加回答
舉報(bào)
0/150
提交
取消