请教如何将游标以参数的方式使用,比如当成表名的一部分?
declarecursor cc is select distinct substr(vc_mobileno,1,3) trd from dw_foxuser_det order by 1;rec_ind number;ccrec cc%rowtype;begin select count(*) into rec_ind from user_table where table_name = upper('tp_20120807_a01'); if (rec_ind <> 0) thenExecute immediate 'drop table tp_20120807_a01 purge';Execute immediate 'create table tp_20120807_a01 (test varchar2(11))';end if;for ccrec in cc loop insert into tp_20120807_a01 select vc_mobileno from dw_foxuser_det_138 where substr(vc_mobileno,4,3) = ccrec.trd; commit;end loop;End;