Oracle variable binding statements do not like to see the use of procedure | concatenates SQL statements, so an example of variable binding is provided. It is only for reference in Java code create or replace procedure using_test (t_name nvarchar2) as v_id char; v_sex char; begin www.2cto.com execute immediate 'select id, sex from test_zyy where name =: 1 'into v_id, v_sex using t_name; dbms_output.put_line ('ID: '| v_id | 'gender:' | v_sex); exception when others then dbms_output.put_line ('corresponding information cannot be found! '); End using_test; some people say that the process will customize the optimization code. Well, I don't know whether this is a hearsay or I really know the code from nb, however, there is an Alter system set cursor_sharing = similar statement that can force the use of the shared area. www.2cto.com converts the hard parsing method into soft parsing-binding variables. However, this method is not recommended, because in some conditions, the execution speed is reduced. The most obvious example is the paging rownum.