存储过程 begin end
createprocproc_deluser(@user_idvarchar(20),@user_namevarchar(30),@user_rolechar(1))as...
create proc proc_deluser
(@user_id varchar(20),
@user_name varchar(30),
@user_role char(1)
)
as
if(exists(select * from users where user_id=@user_id and user_name=@user_name and user_role=@user_role))
begin
delete from users
where user_id =@user_id
delete from edub where user_id=@user_id
delete from xzkh where user_id=@user_id
return 1
end
return -1
请问这个存储过程begin后返回一个参数,end后又返回一个参数,怎么理解啊? 展开
(@user_id varchar(20),
@user_name varchar(30),
@user_role char(1)
)
as
if(exists(select * from users where user_id=@user_id and user_name=@user_name and user_role=@user_role))
begin
delete from users
where user_id =@user_id
delete from edub where user_id=@user_id
delete from xzkh where user_id=@user_id
return 1
end
return -1
请问这个存储过程begin后返回一个参数,end后又返回一个参数,怎么理解啊? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询