aiaiDBA

加微信获取免费职业规划+学习资料,了解年薪50万的DBA是如何练成的

13718043309

010-86462881

ORA-06546: DDL statement is executed in an illegal context

ORA-06546: DDL statement is executed in an illegal context
Cause: DDL statement is executed dynamically in illegal PL/SQL context.
- Dynamic OPEN cursor for a DDL in PL/SQL

- Bind variable's used in USING clause to EXECUTE IMMEDIATE a DDL

- Define variable's used in INTO clause to EXECUTE IMMEDIATE a DDL

Action: Use EXECUTE IMMEDIATE without USING and INTO clauses to execute the DDL statement.

请先 登录 后评论

1 个回答

小智
ORA-06546:DDL语句在非法上下文中执行,
.原因: DDL语句在非法PL / SQL上下文中动态执行。,
.- PL / SQL中的DDL的动态OPEN游标,
.,
.- 将USING子句中使用的变量绑定到EXECUTE IMMEDIATE DDL,
.,
.- 定义在INTO子句中使用的变量EXECUTE IMMEDIATE一个DDL,
.,
.操作:使用EXECUTE IMMEDIATE而不使用USING和INTO子句来执行DDL语句。,
.
请先 登录 后评论