//往学生表中插入内容
insert into pm_stu values('1','张三');
insert into pm_stu values('2','李四');
insert into pm_stu values('3','王五');
insert into pm_stu values('4','赵六');
//往选课表中插入内容
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','赵六');
//往选课表中插入内容
insert into pm_ci values('1','1,2,3,4,');
insert into pm_ci values('2','1,4');
select ci_id,wm_concat(stu_name) stu_name
from (select c.ci_id,s.stu_name
from pm_ci c,pm_stu s
where instr(c.stu_ids,s.stu_id)>0)
group by ci_id
order by ci_id;
from (select c.ci_id,s.stu_name
from pm_ci c,pm_stu s
where instr(c.stu_ids,s.stu_id)>0)
group by ci_id
order by ci_id;