|
Select stu_id From table_sele_cou Where cou_id In(select cid from table_cou where cname='数学' Or cname='语文') Group By stu_id Having Count(stu_id)=2; 创建课程表: create table TABLE_COU constraint FK_TABLE_COU primary key (CID)
创建学生选课表: create table TABLE_SELE_COU constraint FK_SELE_COU_ID primary key (ID)
创建学生表: create table TABLE_STU constraint FK_TABLE_STU_ID primary key (ID) |
转自:http://hi.baidu.com/shao_nan/blog/item/a3d2b7ee2de54a2c2cf534e2.html
浙公网安备 33010602011771号