Preview:
declare 
   invalid_sal Exception;
   s employ.sal%type:=&sal;
begin 
   if (s<3000) then
     raise invalid_sal;
   else
     --insert into employ(sal) values(s);
     dbms_output.put_line('Record inserted');
   end if;
Exception
      when invalid_sal then
           dbms_output.put_line('sal greater ');
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