对 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
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: CreateIndexShiTuAsSelectCno,Cname,Ccredit,Ccredit*16asiXueshifromCourse B: CreateViewShiTuAsSelectCno,Cname,Ccredit,Ccredit*16fromCourse C: CreateProcShiTuAsSelectCno,Cname,Ccredit,Ccredit*16asiXueshifromCourse D: CreateViewShiTuAsSelectCno,Cname,Ccredit,Ccredit*16asiXueshifromCourse
- 对 Course表,使用课程号,课程名,学分,及额外增加的iXueshi字段创建视图,学时为学分乘以16,正确的SQL语句是( )。
- 有三个表,学生表 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”)
- 下列SQL语句中,_____________可以在“学生-课程”数据库正确实现“查询学生201215012选修课程的总学分数”。 A: SELECT COUNT(Ccredit)FROM SC, CourseWHER Sno='201215012' B: SELECT COUNT(Ccredit)FROM SC, CourseWHER Sno='201215012' AND SC.Cno=Course.Cno C: SELECT SUM(Ccredit)FROM SC, CourseWHER Sno='201215012' D: SELECT SUM(Ccredit)FROM SC, CourseWHER SC.Cno=Course.Cno AND Sno='201215012'
- 查询选修了'数据库基础'课程的同学的学号,和这些同学选修的全部课程号和分数.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='数据库基础')