title: PLS-00103: Encountered the symbol "DECLARE"
body: <p>i am trying to execute or run the following pl/sql script:</p>
  
  <pre><code>SET serveroutput on;
  
  CREATE OR REPLACE PROCEDURE findAvg
  (p_category IN products.category_id% TYPE, c OUT NUMBER)
  AS
  BEGIN
  SELECT NVL ((SELECT AVG(LIST_PRICE) FROM products
  WHERE p_category = category_id), -1) into p_category
  from dual;
  END findAvg;
  DECLARE
   cat  products.category_id%TYPE;
   Price   products.List_price%TYPE;
  BEGIN
  cat := &amp;p_category;
  findAvg (cat, price); 
  if (price = -1) then
      dbms_output.put_line('Wrong Category ');
  ELSE
      dbms_output.put_line('the average price for category' || cat || ' is ' || price);
   END IF;
  END;
  /
  show errors
  </code></pre>
  
  <p>but when i try to run it, i get this error message (i can see it only after show errors):</p>
  
  <pre><code>       PLS-00103: Encountered the symbol "DECLARE" 
  </code></pre>
  
  <p>what is wrong with this declare?</p>