CREATE OR REPLACE PROCEDURE ADD_ORDER
 (kundenid ord.custid%type, kommplan ord.commplan%type DEFAULT NULL)
AS
    curdate ord.orderdate%type; 
BEGIN
    curdate := SYSDATE;
    INSERT INTO ord(ordid, orderdate, commplan, custid)
    VALUES(ordid.nextval, curdate, kommplan, kundenid);
END ADD_ORDER;
/


