帮我看看这个from varchar2_table(i) 这样可以吗?该怎么改啊declare
type varchar2_table_type is table of varchar2(256) index by binary_integer;
varchar2_table varchar2_table_type;
type col_1_table_type is table of col_1_table%type index by binary_integer;
col_1_table col_1_table_type;begin
select distinct owner||'.'||table_name bulk collect into varchar2_table from all_tables a ;
for i in 1..varchar2_table.count loop
select col_1 bulk collect into col_1_table from varchar2_table(i);
end loop;
end;
/
type varchar2_table_type is table of varchar2(256) index by binary_integer;
varchar2_table varchar2_table_type;
type col_1_table_type is table of col_1_table%type index by binary_integer;
col_1_table col_1_table_type;begin
select distinct owner||'.'||table_name bulk collect into varchar2_table from all_tables a ;
for i in 1..varchar2_table.count loop
select col_1 bulk collect into col_1_table from varchar2_table(i);
end loop;
end;
/
sql := '
....此处略去N字
';
execute immediate sql;
[into defined_variable1,defined_variable2,...]
[using [in |out|in out] bind_argument1,bind_argument2,....]
[{returning | return} field1,field2,... into bind_argument1,bind_argument2,....]注意:
1,数据定义语句 不接受任何绑定参数:postalCode;
2. 模式对象名称 不能使用绑定参数:my_tableName(改用变量拼接吧 v_my_tableName varchar2(16))。
3. dynamic_sql_string末尾不要使用分号和右斜杠/