第一关:
insert into Student (sno, sname, ssex, sage, sdept) values ('001','Smith','m',18,'CS');
insert into Student (sno, sname, ssex, sage, sdept) values ('002','Ketty','f',19,'MA');
insert into Course (cno,cname,cpno,ccredit) values ('C01','DB',null,2);
insert into Course (cno,cname,cpno,ccredit) values ('C02','Oracle','C01',3);
insert into SC (sno,cno,grade) values ('001','C01',70);
insert into SC (sno,cno,grade) values ('001','C02',82);
insert into SC (sno,cno,grade) values ('002','C01',86);
第二关
update SC set grade=grade+5 where grade<60;
update Student set Sage=Sage+1 where Ssex='m' and Sdept='CS';
update Student set Sno='S'+Sno where Sno!='';
第三关
update Student set Sno = REPLACE(Sno, 'S', '');
update Student set Sno=RTRIM(Sno)+'S';
第四关
delete from SC where grade is null;
delete from Student where Ssex='f'and Sage = '18'
delete from course where ccredit=3;