设有三个关系:
Student ( Sno ,Sname ,Ssex ,Sage ,Sdept);
Course ( Cno ,Cname ,Teacher );
SC ( Sno ,Cno ,Grade )。
查询问题:
( 1 ) 删除选课成绩在 60分以下的学生记录;
( 2) 把“大学英语”课程成绩提高 5%。
( 1 ) DELETE FROM Student
WHERE SNO IN ( SELECT SNO
FROM SC
WHERE GRADE<60 ) ;
( 2 ) UPDATE SC SET Grade=Grade*1.05
WHERE Cno IN ( SELECT Cno FROM Course
WHERE Cname =“大学英语”) ;