title: Call Cursor located in different procedure
body: <p>I have a rather complex cursor located in a stored procedure that I'm going to need in a different procedure. Is it bad practice to just copy and paste the cursor in this procedure? Could I just call that cursor sort of like this?</p>
  
  <pre><code>OPEN diffProcedure.cursorName(params)... 
  LOOP
      FETCH ....
      INTO ....
      EXIT WHEN ....
  END LOOP;
  </code></pre>
  
  <p>The cursor is probably 200 lines of complicated code which I don't have a good understanding of (<code>Junior Dev</code> working on complicated business PL/SQL code), but I know what it does. Calling it with the parameters I need will get the correct data needed.</p>
  
  <p>Is it a bad idea to just copy the cursor from one procedure to another? Could I call the cursor from a different procedure? </p>