title: How to print the cursor values in oracle?
body: <p>I am new to oracle and I am learning cursors.My table City has two columns city_id,city_name.So,this is what I tried:</p>
  
  <pre><code>DECLARE
    CURSOR city_list is
    SELECT * from OT.City;
  
    v_list SYS_REFCURSOR;
  BEGIN
    OPEN city_list FOR
     v_list := city_list;
     DBMS_OUTPUT.PUT_LINE(v_list.city_id);
     EXIT WHEN city_list%NOTFOUND;
    CLOSE city_list;
  END;
  /
  </code></pre>
  
  <p>i am trying to assign the data of cursor to the newly declared value   <code>v_list SYS_REFCURSOR;</code>.But the output is coming as error at <code>v_list := city_list;</code>.How can I assign all the values of cursors to the another cursor directly or is there any other methods?</p>