create or replace procedure delete_flight (c_routecode in varchar2) as begin delete from flight where route_code = c_routecode; if sql%notfound then raise_application_error(-20101,'Record does not exist'); null; else commit; end if; end; /