aiaiDBA

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

13718043309

010-86462881

PCC-02206: Host variables are not permitted within a DDL statement

PCC-02206: Host variables are not permitted within a DDL statement
Cause: A Data Definition Language statement cannot use host variables. For example, the statement CREATE TABLE :table_name (c1 char(10)); is illegal, because the name of the table in a CREATE TABLE statement cannot be represented using host variable.
Action: Use dynamic SQL to create the names of database objects (tables, views, columns, etc.) at runtime. See the Programmer's Guide to the Oracle Precompilers, Release2.2 for information about dynamic SQL.

请先 登录 后评论

1 个回答

小智
PCC-02206:DDL语句中不允许使用主机变量,
.原因:数据定义语言语句不能使用主机变量。例如,语句CREATE TABLE:table_name(c1 char(10)); 是非法的,因为CREATE TABLE语句中的表的名称不能使用主机变量来表示。,
.操作:使用动态SQL在运行时创建数据库对象(表,视图,列等)的名称。有关动态SQL的信息,请参阅Oracle Precompilers,Release2.2的“程序员指南”。,
.
请先 登录 后评论