Using (dynamic statement) [SQL] -- create test table create table t01 (id integer, name varchar2 (10); www.2cto.com -- create test data insert into t01 (id, name) values (1, 'A'); insert into t01 (id, name) values (2, 'B'); insert into t01 (id, name) values (3, 'C'); -- submit commit; -- query the table data select * from t01; -- use a dynamic statement to assign a value to the variable www.2cto.com declare id t01.id % type: = '1 '; name t01.name % type; begin execute immediate 'select name from t01 t where id =: 1 'into name using id; dbms_output.put_line (name); end; -- use a dynamic statement to insert data declare id t01.id % type: = 4; name t01.name % type: = 'D'; begin execute immediate 'insert into t01 (id, name) values (: 1,: 2) 'using id, name; commit; end; -- use a dynamic statement to update the data declare id t01.id % type: = 3; name t01.name % type: = 'D '; begin execute immediate 'Update t01 set name =: 1 where id =: 2' using name, id; commit; end; -- use a dynamic statement to delete data declare id t01.id % type: = 4; begin execute immediate 'delete from t01 where id =: 1 'using id; commit; end;