title: Need to use PLSQL variable if select returns more than one record. No need of collection/Cursors.
body: <p>I need to use PLSQL variable to hold more than three values . I don't want collection or cursor. Below is the requirement, v_cnt needds to be 9 instead of '0'. PLease help on this. </p>
  
  <pre><code>declare 
  v_column VARCHAR2(200);
  v_cnt number :=0;
  begin
    select (SELECT listagg(TABLE_NAME,',')within group(order by table_name) FROM ALL_TABLES where owner in 'SYS' AND  rownum&lt;10 )
    into v_column 
    from dual;
  
    select count(*) into v_cnt from all_tables where table_name in(v_column);
    DBMS_OUTPUT.PUT_LINE('v_column=' || v_column||'  VC-nt : = '||v_cnt);
  end;
  </code></pre>
  
  <p>v_column will have comma separated values. I need to pass it in in operator, but v_column whole values considered as single value. IS there any way to pass it as separate 9 values inside IN operator. </p>