在sql中使用绑定变量
SQL> variable v_a varchar2(20);
SQL> variable v_b number;
SQL> exec :v_a := 'ddd';
PL/SQL procedure successfully completed.
SQL> exec :v_b := 999;
PL/SQL procedure successfully completed.
SQL> insert into t_8 values(:v_a,:v_b);
1 row created.
SQL> commit;
Commit complete.
SQL> select * from t_8;
A B
-------------------- ----------
ddd 999