对于SroceDB数据库,编写存储过程,输入一个班级编号,返回班级名称,院系,人数。求解哪错了
create procedure selec1(@classnu char(6),
@classna varchar(30)output,
@institu varchar(30)output,
@people int output)
as
select className 班级名称,institute 院系,count(studentNo) 人数 from Class,Student where Class.classNo=Student.classNo
and Class.classNo=@classnu group by className,institute
go
declare @classna varchar(30),@institu varchar(30),@people int
execute selec1 'CP0801',@classna output,@institu output,@people output
select @classna,@institu,@people
select className 班级名称,institute 院系,count(studentNo) 人数 from Class,Student where Class.classNo=Student.classNo
group by className,institute