查询选修了'数据库基础'课程的同学的学号,和这些同学选修的全部课程号和分数.select sno,cno,gradefrom ______________________ A: sc where sno in (select sno from sc join course on sc.cno=course.cno where cname='数据库基础') B: sc join course on sc.cno=course.cno where cname='数据库基础' C: sc where sno in (select sno from course where cname='数据库基础') D: sc where cno in (select cno from course where cname='数据库基础')
查询选修了'数据库基础'课程的同学的学号,和这些同学选修的全部课程号和分数.select sno,cno,gradefrom ______________________ A: sc where sno in (select sno from sc join course on sc.cno=course.cno where cname='数据库基础') B: sc join course on sc.cno=course.cno where cname='数据库基础' C: sc where sno in (select sno from course where cname='数据库基础') D: sc where cno in (select cno from course where cname='数据库基础')
把’数据库原理‘课程分数小于60分的同学的‘数据库原理’课程分数加5分。update _______set grade=grade+5from _________________________where ________________________ A: sc ; sc join course on course.cno=sc.cno ; cname='数据库原理' and grade<60 B: course ; sc join course on course.cno=sc.cno ; cname='数据库原理' and grade<60 C: sc ; sc join course on course.cno=sc.cno ; cname='数据库原理' and grade
把’数据库原理‘课程分数小于60分的同学的‘数据库原理’课程分数加5分。update _______set grade=grade+5from _________________________where ________________________ A: sc ; sc join course on course.cno=sc.cno ; cname='数据库原理' and grade<60 B: course ; sc join course on course.cno=sc.cno ; cname='数据库原理' and grade<60 C: sc ; sc join course on course.cno=sc.cno ; cname='数据库原理' and grade
同时选修了‘数据结构’和‘操作系统’2门课程的同学学号、姓名。select student.sno,sname from student,sc,coursewhere student.sno=sc.sno and course.cno=sc.cnoand _________________________________________________ A: cname='数据结构' and student.sno in(select sno from sc,course where sc.cno=course.cno and cname='操作系统') B: cname='操作系统' and student.sno in(select sno from sc,course where sc.cno=course.cno and cname='数据结构') C: cname='数据结构' and cname='操作系统' D: student.sno in(select sno from sc,course where sc.cno=course.cno and cname='操作系统'and cname='数据结构')
同时选修了‘数据结构’和‘操作系统’2门课程的同学学号、姓名。select student.sno,sname from student,sc,coursewhere student.sno=sc.sno and course.cno=sc.cnoand _________________________________________________ A: cname='数据结构' and student.sno in(select sno from sc,course where sc.cno=course.cno and cname='操作系统') B: cname='操作系统' and student.sno in(select sno from sc,course where sc.cno=course.cno and cname='数据结构') C: cname='数据结构' and cname='操作系统' D: student.sno in(select sno from sc,course where sc.cno=course.cno and cname='操作系统'and cname='数据结构')
查询没有选数据库基础课程的同学学号和姓名。select sno,sname from student where ____________(select ______ from sc ,course where _______________ and cname='数据库基础') A: not exists;* ; course.cno=sc.cno and student.sno=sno B: not exists;sno ; course.cno=sc.cno and student.sno=sc.sno C: sno not in ; sno ; course.cno=sc.cno D: sno not in ; * ; course.cno=sc.cno and student.sno=sc.sno
查询没有选数据库基础课程的同学学号和姓名。select sno,sname from student where ____________(select ______ from sc ,course where _______________ and cname='数据库基础') A: not exists;* ; course.cno=sc.cno and student.sno=sno B: not exists;sno ; course.cno=sc.cno and student.sno=sc.sno C: sno not in ; sno ; course.cno=sc.cno D: sno not in ; * ; course.cno=sc.cno and student.sno=sc.sno
有三个表,学生表 Stu(Sno,Sname,Ssex,Sbirthday,Sdept),字段分别表示学号,姓名,性别,出生日期,所在系,学号为主码;课程表Course(Cno,Cname)字段分别表示课程号,课程名,课程号为主码,成绩表SC(Sno, Cno,degree),字段分别表示学号,课程号,成绩,(Sno,Cno)共同为主码,分别参考Stu,Course表的主码。查询课程号是”C01””C02””CO3”的课程名的语句是? A: SELECT Cname FROM Course WHERE Cno =”C01”&&”CO2”&&”CO3” B: SELECT Cname FROM Course WHERE Cno IN ”C01”&&”CO2”&&”CO3” C: SELECT Cname FROM Course WHERE Cno IN (”C01”, ”CO2”, ”CO3”) D: SELECT Cname FROM Course WHERE Cno IN( ”C01” AND ”CO2”AND ”CO3”)
有三个表,学生表 Stu(Sno,Sname,Ssex,Sbirthday,Sdept),字段分别表示学号,姓名,性别,出生日期,所在系,学号为主码;课程表Course(Cno,Cname)字段分别表示课程号,课程名,课程号为主码,成绩表SC(Sno, Cno,degree),字段分别表示学号,课程号,成绩,(Sno,Cno)共同为主码,分别参考Stu,Course表的主码。查询课程号是”C01””C02””CO3”的课程名的语句是? A: SELECT Cname FROM Course WHERE Cno =”C01”&&”CO2”&&”CO3” B: SELECT Cname FROM Course WHERE Cno IN ”C01”&&”CO2”&&”CO3” C: SELECT Cname FROM Course WHERE Cno IN (”C01”, ”CO2”, ”CO3”) D: SELECT Cname FROM Course WHERE Cno IN( ”C01” AND ”CO2”AND ”CO3”)
对 Course表,使用课程号,课程名,学分,及额外增加的iXueshi字段创建视图,学时为学分乘以16,正确的SQL语句是( )。 A: Create View ShiTu As Select Cno,Cname ,Ccredit ,Ccredit *16 as iXueshi from Course B: Create View ShiTu As Select Cno,Cname ,Ccredit ,Ccredit *16 from Course C: Create Proc ShiTu As Select Cno,Cname ,Ccredit ,Ccredit *16 as iXueshi from Course D: Create Index ShiTu As Select Cno,Cname ,Ccredit ,Ccredit *16 as iXueshi from Course
对 Course表,使用课程号,课程名,学分,及额外增加的iXueshi字段创建视图,学时为学分乘以16,正确的SQL语句是( )。 A: Create View ShiTu As Select Cno,Cname ,Ccredit ,Ccredit *16 as iXueshi from Course B: Create View ShiTu As Select Cno,Cname ,Ccredit ,Ccredit *16 from Course C: Create Proc ShiTu As Select Cno,Cname ,Ccredit ,Ccredit *16 as iXueshi from Course D: Create Index ShiTu As Select Cno,Cname ,Ccredit ,Ccredit *16 as iXueshi from Course
课程表的关系模式:course(cno,cname,credit,semeste...新课信息插入到Course表中,使用语句
课程表的关系模式:course(cno,cname,credit,semeste...新课信息插入到Course表中,使用语句
下列查询中,属于相关子查询的有()。 A: SELECT * FROM student WHERE sno IN (SELECT sno FROM sc WHERE cno='1'); B: SELECT sno, cno FROM SC x WEHRE grade>=(SELECT AVG(grade) FROM SC y WHERE y.sno = x.sno); C: SELECT sname FROM student WHERE EXISTS(SELECT * FROM sc WHERE sno=student.sno AND cno='1'); D: SELECT sname FROM student WHERE NOT EXISTS(SELECT * FROM course WHERE NOT EXISTS(SELECT * FROM sc WHERE sc.sno=student.sno AND sc.cno=course.cno));
下列查询中,属于相关子查询的有()。 A: SELECT * FROM student WHERE sno IN (SELECT sno FROM sc WHERE cno='1'); B: SELECT sno, cno FROM SC x WEHRE grade>=(SELECT AVG(grade) FROM SC y WHERE y.sno = x.sno); C: SELECT sname FROM student WHERE EXISTS(SELECT * FROM sc WHERE sno=student.sno AND cno='1'); D: SELECT sname FROM student WHERE NOT EXISTS(SELECT * FROM course WHERE NOT EXISTS(SELECT * FROM sc WHERE sc.sno=student.sno AND sc.cno=course.cno));
现有关系student (sno,sname,sex,age)course(cno,cname,credit)sc(sno,cno,socre)查找王燕所选修的课程的课程和成绩,将查询到哪些关系( ) A: student B: course 和student C: student 和sc D: student,course 和sc
现有关系student (sno,sname,sex,age)course(cno,cname,credit)sc(sno,cno,socre)查找王燕所选修的课程的课程和成绩,将查询到哪些关系( ) A: student B: course 和student C: student 和sc D: student,course 和sc
删除课程号为s5的课程记录,使用SQL语句:delete course cno="s5";
删除课程号为s5的课程记录,使用SQL语句:delete course cno="s5";