假如我新建一个存储过程,后来想加以修改,该如何写??新建代码如下:
CREATE procedure usercheck
@infullname varchar(50),
@inpassword varchar(50),
@outcheck char(3) OUTPUT
as
if exists(select * from userinfo where fullname=@infullname and password=@inpassword)
select @outcheck='yes'
else
select @outcheck='no'
比如我想在上面的存储过程中加以修改,加上一个插入语句,insert into userinfo values('11','22','33')
该如何修改这个存储过程(以上面的代码为例),各位大侠帮帮忙啊!!
CREATE procedure usercheck
@infullname varchar(50),
@inpassword varchar(50),
@outcheck char(3) OUTPUT
as
if exists(select * from userinfo where fullname=@infullname and password=@inpassword)
select @outcheck='yes'
else
select @outcheck='no'
比如我想在上面的存储过程中加以修改,加上一个插入语句,insert into userinfo values('11','22','33')
该如何修改这个存储过程(以上面的代码为例),各位大侠帮帮忙啊!!
alter procedure usercheck
@infullname varchar(50),
@inpassword varchar(50),
@outcheck char(3) OUTPUT
as
if exists(select * from userinfo where fullname=@infullname and password=@inpassword)
select @outcheck='yes'
else
begin
select @outcheck='no'
insert into userinfo values('11','22','33')
end
go
create proc usercheck
...