//查詢結(jié)果
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 ci_id
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 ci_id
2016-05-10
//往學(xué)生表中插入內(nèi)容
insert into pm_stu values('1','張三');
insert into pm_stu values('2','李四');
insert into pm_stu values('3','王五');
insert into pm_stu values('4','趙六');
//往選課表中插入內(nèi)容
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','趙六');
//往選課表中插入內(nèi)容
insert into pm_ci values('1','1,2,3,4,');
insert into pm_ci values('2','1,4');
2016-05-10
//創(chuàng)建學(xué)生表
create table pm_stu
(stu_id varchar2(20) not null,
stu_name varchar2(20)
)
//創(chuàng)建選課表
create table pm_ci
(ci_id varchar2(20) not null,
stu_ids varchar2(100)
)
create table pm_stu
(stu_id varchar2(20) not null,
stu_name varchar2(20)
)
//創(chuàng)建選課表
create table pm_ci
(ci_id varchar2(20) not null,
stu_ids varchar2(100)
)
2016-05-10
select p.ci_id as CI_ID,wm_concat(s.stu_name) as STU_NAME
from pm_ci p,pm_stu s
where instr(p.stu_ids,s.stu_id)>0
group by p.ci_id
from pm_ci p,pm_stu s
where instr(p.stu_ids,s.stu_id)>0
group by p.ci_id
2016-05-02
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;
2016-04-25