存储过程,在关键字 'as' 附近有语法错误。,错在哪了》求指点啊??
createproczz@fromidint,@toidint,@moneysmoney,asbegintranupdatejinesetmoneys=moneys-@m...
create proc zz
@fromid int,
@toid int,
@moneys money,
as
begin tran
update jine set moneys = moneys-@moneys where @fromid = id
update jine set moneys=moneys+@moneys where @toid=id
if @@error<>0
begin rollback tran
return 0;
end
else
begin commit tran
return 1
end
------------------------------------------------------------------------
在关键字 'as' 附近有语法错误。 展开
@fromid int,
@toid int,
@moneys money,
as
begin tran
update jine set moneys = moneys-@moneys where @fromid = id
update jine set moneys=moneys+@moneys where @toid=id
if @@error<>0
begin rollback tran
return 0;
end
else
begin commit tran
return 1
end
------------------------------------------------------------------------
在关键字 'as' 附近有语法错误。 展开
展开全部
create proc zz
@fromid int,
@toid int,
@moneys money
as
begin tran
update jine set moneys = moneys-@moneys where @fromid = id
if @@error<>0
begin
rollback tran
return 0;
end
update jine set moneys=moneys+@moneys where @toid=id
if @@error<>0
begin
rollback tran
return 0;
end
commit tran
return 1
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询