create trigger appInfo_trigger before update on appinfo for each row
Begin
insert into appinfo_record(appId)values(old.id); if new.state=6 then select id into @uiId from ui_application where package=old.pgn limit 1;//这里结果可能为null if @uiId=null or @uiId=0 then
insert into ui_application(name)values(old.appName);
else
update ui_application set name=old.appName where id=@uiId;
end if;
end if;
end;为什么上面的触发器总是执行else下面的update,是不是我那里错误了
解决方案 »
- 求mysql的dos操作命令
- 高手请进:linux mysql C api; 连接数据库问题
- mysql驱动jar包问题,知道的给解释一下。
- 查询排名
- mysql百万数据查询速度过慢
- 一条SQL从 MSSqlServer 到 Mysql 的转换
- phpMyAdmin不能连接:无法载入mysqli扩展
- Mysql不支持存储过程,装innodb后多了transaction,但好像也没有procedure
- 提问MYSQL语法
- 在access sql中怎么实现mysql的sql语句select * from user where id>1 order by id DESC limit 3,10?????
- 求助 mysql排序出问题了
- postgresql安装失败
select id into @uiId from ui_application where package=old.pgn limit 1
什么结果
SELECT IFNULL(@uiId,0)
结果是什么