title: how to use OUT mode in dynamic sql
body: <p>This is what, I'm trying </p>
  
  <pre><code>  1  declare
    2  stmt VARCHAR2(200):='&amp;query';
    3  emprec emp%ROWTYPE;
    4  BEGIN
    5    EXECUTE IMMEDIATE stmt USING out emprec,in &amp;id;
    6    DBMS_OUTPUT.PUT_LINE('Emp: '||emprec.ename);
    7* END;
  SQL&gt; /
  Enter value for query: select * into :emprec from emp where empno=:no
  old   2: stmt VARCHAR2(200):='&amp;query';
  new   2: stmt VARCHAR2(200):='select * into :emprec from emp where empno=:no';
  Enter value for id: 7369
  old   5:   EXECUTE IMMEDIATE stmt USING out emprec,in &amp;id;
  new   5:   EXECUTE IMMEDIATE stmt USING out emprec,in 7369;
    EXECUTE IMMEDIATE stmt USING out emprec,in 7369;
                                     *
  ERROR at line 5:
  ORA-06550: line 5, column 36:
  PLS-00457: expressions have to be of SQL types
  ORA-06550: line 5, column 3:
  PL/SQL: Statement ignored
  </code></pre>
  
  <p>But, when I'm changing the <strong>5th</strong> line to</p>
  
  <p><code>EXECUTE IMMEDIATE stmt into emprec USING in &amp;id;</code></p>
  
  <p>and query <code>select * from emp where empno=:no</code></p>
  
  <p>Then it is working fine and showing the correct output. Anyone please help me, how to solve this problem</p>