title: Insert into a table using a stored procedure
body: <p>I have this simple stored procedure, where it would add a column to my <code>Orders</code> table</p>
  <pre><code>create or replace PROCEDURE ADD_ORDER 
  (
    CUSTOMER_ID IN NUMBER 
  , NEW_ORDER_ID OUT NUMBER 
  ) AS 
  DECLARE
    NEW_ORDER_ID := MAX(ORDERS.ORDER_NO) + 1;
  BEGIN
    INSERT INTO ORDERS(ORDER_NO, REP_NO, CUST_NO, ORDER_DT, STATUS)
    VALUES( NEW_ORDER_ID, 36, CUSTOMER_ID, CURDATE(), 'C')
  END ADD_ORDER;
  </code></pre>
  <p>It is saying the the declare part is not at the correct place (I think), and also it should not end there. Here is what it is saying at the error screen:</p>
  <blockquote>
  <p>Error(6,1): PLS-00103: Encountered the symbol &quot;DECLARE&quot; when expecting one of the following:<br />
  begin function pragma procedure subtype type      current cursor delete    exists prior external language The symbol &quot;begin was inserted before &quot;DECLARE&quot; to continue.</p>
  <p>Error(11,1): PLS-00103: Encountered the symbol &quot;END&quot; when expecting one of the following:     , ; return returning</p>
  </blockquote>
  <p>Can anyone tell me what is going wrong here ?</p>