execute immediate簡單用法
v_empno varchar2(40) :='7899';
v_select varchar2(300) := 'select t.sal from emp t where t.empno= :eno';
v_sal varchar2(30);
begin
execute immediate v_select
into v_sal
Using v_empno;
dbms_output.put_line(v_sal);
end;
詳細瞭解https://www.cnblogs.com/andy-wcl/p/3622538.html