1 select ci_id, wm_concat(stu_name)
2 from pm_ci pc, pm_stu ps
3 where instr(pc.STU_IDS,ps.stu_id) > 0
4 group by ci_id;
2 from pm_ci pc, pm_stu ps
3 where instr(pc.STU_IDS,ps.stu_id) > 0
4 group by ci_id;
--pm_stu 插入数据
insert into pm_stu values('1','张三');
insert into pm_stu values('2','李四');
insert into pm_stu values('3','王五');
insert into pm_stu values('4','赵六');
--pm_ci 插入数据
insert into pm_ci values('1','1,2,3,4');
insert into pm_ci values('2','1,4');
insert into pm_stu values('1','张三');
insert into pm_stu values('2','李四');
insert into pm_stu values('3','王五');
insert into pm_stu values('4','赵六');
--pm_ci 插入数据
insert into pm_ci values('1','1,2,3,4');
insert into pm_ci values('2','1,4');