ERROR 1336 (0A000): Dynamic SQL is not allowed in stored function or trigger
来源:互联网 发布:查商品价格的软件 编辑:程序博客网 时间:2024/06/05 18:44
Dynamic SQL is not allowed in stored function or trigger
关于 mysql 的这个错误:
导致的原因是 :
1. 在function或者是trigger里面执行了动态sql语句。
2. 是在function或者是trigger里面调用了含有动态sql语句的存储过程
单独在存储过程里面执行动态sql语句是没有问题的。
解决的办法:
目前最新的mysql版本来说 function trigger还是不支持 动态sql语句的。
当然可以绕开数据库 用应用程序来解决是最好的了。
要是硬要用数据库的办法来解决的话 :(以function为例子)
我的办法是 :
1. 生成一张存储 function 所执行的所有语句到临时表中(包括调用其他procedure产生的ddl ,dml语句)
(此时的过程返回的结果 应该也是以字符串的格式 将产生的ddl ,dml语句插入到临时表中去)
2. 遍历顺序执行临时表
- ERROR 1336 (0A000): Dynamic SQL is not allowed in stored function or trigger
- ERROR 1336 (0A000): Dynamic SQL is not allowed in stored function or trigger
- ERROR 1336 (0A000): Dynamic SQL is not allowed in stored function or trigger
- mysql触发器报错 1422 Explicit or implicit commit is not allowed in stored function or trigger.
- MySQL必知必会 ERROR 1415 (0A000): Not allowed to return a result set from a trigger
- Error:Content is not allowed in prolog.
- mysql -- error code [1442]; Can't update table 'table_name' in stored function/trigger because it is already used by statement w
- ERROR 1442 (HY000): Can\'t update table \'sign\' in stored function/trigger because it is already used by statement which invoke
- Error 1313: RETURN is only allowed in a FUNCTION SQL Statement
- SQL SERVER – Fix: Error Msg 128 The name is not permitted in this context. Only constants, expressions, or variables allowed her
- error: a function-definition is not allowed here before ‘{’ token
- Can't update table 'tbl' in stored function/trigger because it is already used by statement which invoked this stored function/t
- mysql 触发器的问题 Can't update table 'tbl' in stored function/trigger because it is already used by state
- Can't update table 'psxt_user' in stored function/trigger because it is already used by statement wh
- mysql创建触发器错误提示:Can not update in stored function/trigger already used by statement invoked
- VS错误error C3872: '0x3000': this character is not allowed in an identifier
- VS错误error C3872: '0x3000': this character is not allowed in an identifier
- error C3872: '0x3000': this character is not allowed in an identifier 解决方法
- socket异步编程--libevent的使用
- Java数组与容器类分析资料–数组、List和Set、Map等
- 新版linux系统设备架构中关于电源管理方式的变更
- 六个建议防止SQL注入式攻击
- Java中使用图片验证码
- ERROR 1336 (0A000): Dynamic SQL is not allowed in stored function or trigger
- BASE64Decoder小解
- java生成图片验证码2
- OpenGL,多边形上贴BMP (C/C++版)+在QT中的使用
- 【排序算法】内排序算法总结
- Java生成验证码图片3
- How to add custom fields to Customer Registration and Account page in magento
- 在Objective-C中何时用self.何时不用?
- java iText生成word文档(1)