日期:2014-05-17 浏览次数:21071 次
declare v_importTBName varchar2(10); v_tbName varchar2(10); v_sql varchar2(4000); begin --传递的表名 v_importTBName:='v_test'; v_sql:='select count(1) into v_tbName from '|| v_importTBName; dbms_output.put_line(v_sql); --execute immediate v_sql; end; /* 只能输出语句, select count(1) into v_tbName from v_test 带有into 的语句不能直接用 execute immediate , 等待高手来讲解... */