begin
declare
v_what varchar2(200):='ZJZX'; --参数 这里使用楼主的表名了
v_sql varchar2(4000);
begin
v_sql :='create table t_tmp as (select * from t_app where flag=1 and name='||v_what||' and rownum <7 )' ;
execute immediate v_sql;
exception when others then
null;
end;
end;