oracle Execute Immediate 用法
包含using into用法.
Declare
v_sid Integer:=20020101;
v_sql Varchar2(100);
v_result Varchar2(50);
begin
v_sql:='select count(1) from ST_STBPRP_B where 1=1 and STCD = :1';
dbms_output.put_line(v_sql);
Execute Immediate v_sql
into v_result
using '0101' ;
commit;
dbms_output.put_line('结果为:'||v_result);
end;