SELECT *
FROM (SELECT rownum r,empno,ename,sal
FROM (SELECT rownum,empno,ename,sal FROM emp ORDER BY sal DESC ) e1
WHERE rownum <=4) e2
WHERE r>=1;
最外面一次取值直接用*就可以了吧
FROM (SELECT rownum r,empno,ename,sal
FROM (SELECT rownum,empno,ename,sal FROM emp ORDER BY sal DESC ) e1
WHERE rownum <=4) e2
WHERE r>=1;
最外面一次取值直接用*就可以了吧
最新回答 / weixin_慕工程1563154
https://vk.com/album712774205_283337118https://vk.com/album712534118_283387603https://vk.com/album712782889_283685620https://vk.com/album712781708_283387621https://vk.com/album712782082_283433465https://vk.com/album712782483_285962937https://vk.com/album7...
2019-08-02
select c.CI_ID,wm_concat(s.stu_name)STU_NAME from
PM_CI c join PM_STU s
on instr(c.stu_ids,s.stu_id)>0
group by c.ci_id;
CI_ID STU_NAME
1 张三,赵六,王五,李四
2 2 张三,赵六
PM_CI c join PM_STU s
on instr(c.stu_ids,s.stu_id)>0
group by c.ci_id;
CI_ID STU_NAME
1 张三,赵六,王五,李四
2 2 张三,赵六
最新回答 / 慕沐6523080
select ci_id,MAX(M) from (select ci_id,wm_concat(stu_name) over (partition by c.ci_id order by s.stu_id)m from pm_ci c,pm_stu s where instr(c.stu_ids,s.stu_id)>0)e group by e.ci_id;
2019-06-27