这次还是之前的数据库,以下五道题对应教材第三章结尾部分
Using the university schema that you have write the following queries. In some cases you might need to insert extra data to show the effect of a particular feature.
//有些时候你需要修改数据库
第一题:
Insert each student as an instructor of department ‘拳脚学院’, with salary=40000
插入操作,没什么好说的,注意插之前判断一下教师表里是否已经存在这个人了
insert into instructor
select S.ID, S.name, '拳脚学院', 40000
from student S
where S.ID not in ( select ID from instructor );
第二题:
Now delete all the newly added "