This content has been marked as final. Show 2 replies
You cannot bind Table/Column Names using the Bind Variables (USING) clause.
You will have to append them to the Dynamic SQL.
Something this way:
For more information on Execute Immediate, please read Execute Immediate Statement.
declare update_statement Varchar2(2000); v_table_name varchar2(30); begin v_table_name = 'GR_TEST'; update_statement := ' update ' || v_table_name || ' set n = 2'; execute immediate update_statement; end;
For Dynamic SQL, read Dynamic SQL Oracle 11g.