creating stored procedure

Raj_Chennai
Posted by Raj_Chennai under Sql Server category on | Points: 40 | Views : 1172
create procedure procstatus
(
@username varchar(25),
@reqname varchar(25)
)
as
begin
update friendrequest set status='accept' where acceptor=@username and requestor=@reqname
declare @status varchar(25);
set @status=(select status from friendrequest where (acceptor=@username and requestor=@reqname))
if(@status='accept')
begin
insert into login4 values(@reqname,@username)
end
end

Comments or Responses

Login to post response