动态sqltemp_sql:='SELECT '|| fileds||' FROM '||table; execute immadiate temp_sql;如果是要赋值给变量temp_a,就 execute immadiate temp_sql into temp_a;
上面写错了,应该是execute immediate
动态sql sql='select '||fileds||' from '||table; execute immediate sql bulk collect into lt_bwm110; --定义 type bwm110_rec is record( fileds varchar2(200) ); type bwm110_t is table of bwm110_rec index by binary_integer; lt_bwm110 bwm110_t;
execute immadiate temp_sql;如果是要赋值给变量temp_a,就
execute immadiate temp_sql into temp_a;
sql='select '||fileds||' from '||table;
execute immediate sql
bulk collect into lt_bwm110;
--定义
type bwm110_rec is record(
fileds varchar2(200)
); type bwm110_t is table of bwm110_rec index by binary_integer;
lt_bwm110 bwm110_t;