title: %ROWTYPE variable from table name
body: <p>I've got an Oracle procedure, that I want to be somehow generic. I would like to:</p>
  
  <ol>
  <li>pass a table name as a <code>varchar</code> parameter</li>
  <li>use <code>EXECUTE IMMEDIATE</code> to dynamically select data</li>
  <li>store the result in the <code>%ROWTYPE</code> variable of passed type</li>
  </ol>
  
  <p>The third point seems to be a problem. I'm not sure if i can create a type dynamically inside the procedure body. It would be great to have something like this:</p>
  
  <pre><code>procedure CHANGE_GENERIC(tableName in VARCHAR2, someOldVal in integer,
                            someNewVal in integer) is
  v_sql varchar2(200);
  
  begin   
  
     v_sql := 'select * from ' || tableName || 'where ID = ' || someOldVal;
     EXECUTE IMMEDIATE v_sql1 into **myDynamicRowThatIDontHave**;
  
     -- some other code
  end;
  </code></pre>