56,687
社区成员
发帖
与我相关
我的任务
分享
DECLARE fanty int DEFAULT 0;
DECLARE b int DEFAULT 0;
START TRANSACTION;
if 1=a then
set fanty =1;
set b =1;
else
set fanty =2;
set b =2;
end if
insert into s(fanty) values(fanty);
update t set c = c+b where type =fanty;
commit;