title: Invalid table name error while using Execute Immediate statement with bind variables
body: <p>I'm trying to get this dynamic SQL running ( using <code>EXECUTE IMMEDIATE</code>)</p>
  
  <pre><code>M_SQL_STATEMENT := 'SELECT MAX(:m_var1)+1 from :m_var2 RETURNING MAX(:m_var1)+1 INTO :m_var3';
  
  EXECUTE IMMEDIATE M_SQL_STATEMENT
     USING M_COLUMN_NAME, UPPER(P_TABLE_NAME), M_COLUMN_NAME
     RETURNING INTO M_SEQ_NUMBER;
  </code></pre>
  
  <p>However, when trying to run this, I keep running into </p>
  
  <pre><code>ORA-00903: Invalid table
  </code></pre>
  
  <p>P_TABLE_NAME is a table name which is accepted as an input. I have confirmed that the table name &amp; the column name are valid. I can't figure out why Oracle is throwing the error.</p>
  
  <p>FWIW Altering the SQL statement to </p>
  
  <pre><code>M_SQL_STATEMENT := 'SELECT MAX(:m_var1)+1 SEQ from :m_var2 RETURNING SEQ INTO :m_var3';
  </code></pre>
  
  <p>still results in the same error.</p>