Database Error Messages

Release
toggle
  • 23ai
  • 21c
  • 19c
Updated
Jun 24, 2024

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.