C_plus
2018-07-15 18:35
col 课程号 format a5
col 选课名单 format a20
select c.ci_id 课程号,wm_concat(s.stu_name) 选课名单
from pm_ci c,pm_stu s
where instr(c.stu_ids,s.stu_id)>0
group by c.ci_id;
踏破铁鞋无觅处,蓦然回首,答案就在灯火阑珊处
select p.ci_id,max(stu_name) as STU_NAME
from (select c.ci_id,wm_concat(s.stu_name)
over(partition BY c.stu_ids order by s.stu_id) as stu_name
from pm_ci c,pm_stu s
where instr(c.stu_ids,s.stu_id) > 0) p
group by p.ci_id
查询出来后有排序效果的..
Oracle高级查询
62974 学习 · 147 问题
相似问题