设学生选课库中有3个数据表:
S(sno,sname,birthday,sdeptartment,tel,sex),
SC(sno,cno,grade), C(cno,cname,teacher,pcno)。
检索至少选修课程“数据结构”和“C语言”的学生学号初学SQL 主要问题就是在“至少”这里
S(sno,sname,birthday,sdeptartment,tel,sex),
SC(sno,cno,grade), C(cno,cname,teacher,pcno)。
检索至少选修课程“数据结构”和“C语言”的学生学号初学SQL 主要问题就是在“至少”这里
from sc join c on sc.cno=c.cno
where cno in (select cno from c where cname='数据结构' and cno in
(select cno from c where cname='C语言')
)
where or
where sdeptartment="数据结构" or sdeptartment= "C语言'
这个是选修 数据结构或者c语言的查询吧。。