title: Dynamic cursor Oracle
body: <p>I want to create a dynamic cursor, but my code does not bring me the correct data. What am I doing wrong?</p>
  
  <pre><code>DECLARE
   VAR1 VARCHAR2(500);
   CURSOR CUR1 IS
    SELECT T.COL1 FROM TABLE1 T WHERE T.COL1 IN (VAR1);
  
   BEGIN
    VAR1 := q'['V1','V2']';
    FOR REG IN CUR1 LOOP
     DBMS_OUTPUT.PUT_LINE(REG.COL1);
    END LOOP;
  END;
  </code></pre>