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