title: syntax error when declaring variables in a pl/sql procedure
body: <p>This is sending me a bit mad. I'm trying to add in a variable to a procedure, but it wasn't working - I just got this error message: </p>
  
  <blockquote>
    <p>[Error] Syntax check (25: 7): ERROR line 25, col 7, ending_line 25,
    ending_col 12, Found 'number', Expecting: ;   -or-   ..  :=  DEFAULT 
    NOT  NULL   -or-   %   -or-   (  .  @</p>
  </blockquote>
  
  <p>I knocked up a really basic procedure below to isolate the problem and now I'm completely stuck, as every basic syntax guide I've looked as says to do what I've done. Why can't i declare variables as shown below? I normally code in SQL Server if that's any clue as to my problem. Many thanks if anyone can help!</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE MRCS.pro_xxx_test1 (cats out sys_refcursor)
  IS
  
  declare
  
  spoon number;
  
  balls varchar2(3);
  
  BEGIN
  
   open cats for select * from dual;
  
     end;
  
  /
  </code></pre>