Preview:
declare
    neg exception;
    s employee.empno%type:=&empno;
begin
  if (s<0) then 
      raise neg;
   else 
       dbms_output.put_line('record inseted');
   end if;
 exception
   when neg then 
    dbms_output.put_line('negative number ');
end;
/
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter