码迷,mamicode.com
首页 > 数据库 > 详细

mysql error -- 1415 not allowed to return a result set from a trigger

时间:2015-07-17 15:44:32      阅读:295      评论:0      收藏:0      [点我收藏+]

标签:

在mysql的trigger和function中不能出现select * from table形式的查询,因为其会返回一个结果集;而这在mysql的trigger和function中是不可接受的,但是在存储过程中可以。在 trigger和function中可以使用select ... into ...形式的查询。

NEW 是新值。
OLD 是旧值

INSERT 只有NEW
UPDATE有NEW和OLD
DELETE只有OLD

http://www.2cto.com/database/201301/186392.html

mysql error -- 1415 not allowed to return a result set from a trigger

标签:

原文地址:http://www.cnblogs.com/duhuo/p/4654440.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!