title: Using/Calling a cursor in another cursor - PL/Sql
body: <p>I have a function with a cursor which returns an ID. I need to get some fields in another cursor using this ID result from the first cursor.</p>
  
  <p>So my first cursor is:</p>
  
  <pre><code>CREATE OR REPLACE function get_id(id number) 
  
  CURSOR child_id
     IS
         SELECT table1_id
              FROM table1,child
                WHERE child_id = id
            AND table1_id = child_chld_id;
  </code></pre>
  
  <p>Ideally my second cursor should be:</p>
  
  <pre><code>cursor grandchild_id
  is
  select table1_id from table1,child
  where child_id = (return value of id from cursor child_id)
  and table1_id = child_chld_id; 
  </code></pre>
  
  <p>How do I do this?</p>