(1)创建一自定义函数FIND,参数为学生的学号,返回值为该生姓名及性别
(2)创建一存储过程,其功能是用来查询学号为“20004071102”的学生是否存在,若存在,则显示其学号、姓名、性别、所选修的课程的课程名及成绩值,否则显示“查无此人”
------解决方案--------------------
(2)
create proc pc(@学号 nvarchar(20))
as
if exists(select 1 from 学生表 where [email protected])
select * from 学生表 where [email protected]
else
select '查无此人 '