createtable fall select*from section where semester ='Fall'andyear=2017;
2、创建spring表
createtable spring select*from section where semester ='Spring'andyear=2018;
3、进行交差运算
1、进行交运算
select course_id from spring innerjoin fall using(course_id);//查找既在2017年秋季又在2018年春季开设的课程select course_id from fall where course_id in(select course_id from spring);
select course_id from spring leftjoin fall using(course_id)where fall.course_id isnull;//查询在2018年春季开设单不在2017年秋季开设的课程;select course_id from spring where course_id notin(select course_id from fall);
Mysql数据库的交、差运算1、操作表section2、创建中间表1、创建fall表create table fall select * from section where semester = 'Fall' and year = 2017;2、创建spring表create table spring select * from section where semester = 'Spring' and year = 2018;3、进行交差运算1、进行交运算select cou