当前位置: 代码迷 >> 综合 >> 触发器:[Err] 1415 - Not allowed to return a result set from a trigger
  详细解决方案

触发器:[Err] 1415 - Not allowed to return a result set from a trigger

热度:52   发布时间:2023-12-18 08:55:44.0

  原始sql: create trigger testEmpno after insert on emp for each row select NEW.empno;

  错误:[Err] 1415 - Not allowed to return a result set from a trigger

 

 原因:从MySQL5以后不支持触发器返回结果集

  解决方法:

sql语句:create trigger testEmpno after insert on emp for each row select NEW.empno INTO @ee ;

 

 

  相关解决方案