title: Reference cursor in Oracle Sql Developer
body: <p>I need to write a reference cursor in Oracle SQL developer and I have no clue how its written. I just know basic queries.</p>
  
  <p>I have written following cursor to best of my knowledge after looking up into various example. I am getting an compile error "Missing or Invalid option".</p>
  
  <p>Can anyone help me out?</p>
  
  <p>Step 1: I created a new procedure in Oracle sql developer version 4. 
  Step 2: I wrote the following cursor </p>
  
  <pre><code>DECLARE
  routeid  VARCHAR2(10);
  cursor     c1 IS
  SELECT shipment_id FROM SHIPMENT
  WHERE shipment_id = 20;
  
  BEGIN
  OPEN c1;
   LOOP
     FETCH c1 INTO routeid;
     EXIT WHEN c1%NOTFOUND;
     DBMS_OUTPUT.PUT_LINE(routeid);
   END LOOP;
  END;
  /
  </code></pre>
  
  <p>Thank you in advance for the help.</p>