求大大帮忙做下这个数据库题目T T急啊。。。

2024-12-21 21:02:54
推荐回答(1个)
回答1:

1)SELECT S#,GRADE FROM SC WHERE C#=C2
2)SELECT S.S#,S.SNAME FROM SC JOIN S ON SC.S#=S.S# WHERE S.C#=C2
3)SELECT S.S#,S.NAME FROM S INNER JOIN SC AND C ON S.S#=SC.S# AND SC.C#=C.C# WHERE C.NAME='MATHS'
4)SELECT S# FROM SC WHERE C#=C2 OR C#=C4
5)SELECT S# FROM SC WHERE C#=C2 AND C#=C4
6)SELECT S.NAME,S.AGE FROM S INNER JOIN SC ON S.S#=SC.S# WHERE SC.C#!=C2
7)SELECT S.NAME,S.AGE FROM S INNER JOIN SC ON S.S#=SC.S#
8)SELECT SC.S# FROM SC WHERE SC.C# IN
(SELECT SC.C# FROM SC WHRER SC.S#=S3 )