以下是带参数的存储过程findcredit,参数@cname用于输入所查的课程名,参数@credit用于输出所查课程的学分,请将下面的语句补充完整。 CREATE PROCEDURE findcredit @cname char(30),@credit smallint ____j____ AS SELECT ____k____ CCredit FROM CInfo WHERE CName=____l____
举一反三
- 对 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
- 将java课程的学分改为4学分,正确的语句是( )。 A: UPDATE COURSE SET CREDIT=4 WHERE CNAME= 'java'; B: UPDATE COURSE SET CREDIT=4 WHERE CNAME=‘JAVA’; C: UPDATE COURSE VALUES CREDIT=4 WHERE CNAME=‘java’; D: UPDATE COURSE VALUES CREDIT=4 WHERE CNAME=‘JAVA’;
- 对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
- 以下( )SQL语句可以查询出课程名中只包含“_design”字符串的课程信息。 A: select * from course where cname like '%_design%' B: select * from course where cname like '%\_design%' escape '\' C: select * from course where cname like '% D: _design%' escape ' E: ' F: select * from course where cname like '%*_design%' escape '*'
- 以下是一个带参数的存储过程s_score,参数@sname将接收由调用程序指定的输入值(学生姓名),请将下面的语句补充完整。 CREATE PROCEDURE s_score @sname char(8) AS SELECT score FROM stinfo s JOIN scinfo sc ON s.stid=sc.stid WHERE stname=________