这个存储过程错在哪
alter proc insert_Users @UserName varchar(50),@UserPaw varchar(50),@Email varchar(100),@pj varchar(50) output
as
declare @de_UserName varchar(50)
select @de_UserName=UserName from dbo.Users where UserName=@UserName
if @de_UserName!=''
begin
insert into Users(UserName,UserPaw,Email,Resume,EnterpriseUsers) values(@UserName,@UserPaw,@Email,'没有','不是')
@pj='注册成功'
end
else
begin
@pj='该帐号己存在'
end
go
------解决方案--------------------
alter proc insert_Users @UserName varchar(50),@UserPaw varchar(50),@Email varchar(100),@pj varchar(50) output
as
declare @de_UserName varchar(50)
select @de_UserName=UserName from dbo.Users where UserName=@UserName
if @de_UserName!=''
begin
insert into Users(UserName,UserPaw,Email,Resume,EnterpriseUsers) values(@UserName,@UserPaw,@Email,'没有','不是')
SET @pj='注册成功'
end
else
begin
SET @pj='该帐号己存在'end
go
自己多考虑。。