34,593
社区成员
发帖
与我相关
我的任务
分享
create proc sp_selstu
@cno varchar(10)=c601
as
select SNO,Name,Sex,Dept from student
where exists(select 1 from study inner join course
where study.sno=student.sno and cno=@cno and grade <60)
/*
调用: exec sp_selstu 'c601'
*/
create proc sp_selstu
@cno varchar(10)=c601
as
select SNO,Name,Sex,Dept from student a where exists(select 1 from study where sno=a.sno and cno=@cno and grade<60)
GO