CREATE TABLE emp ( enpno varchar(4), empname varchar(30), designation varchar2(10), category char(1), basicsalary number(4), joined date )
DECLARE mysal number;
sal NUMBER:=&salary;
BEGIN
INSERT INTO emp
VALUES('1003',
'kumar',
'sr.off',
's',
sal,
sysdate);
exception WHEN value_error THEN dbms_output.put_line('salary is limited to 4 digits only');
WHEN others THEN dbms_output.put_line('un identified error occured');
END;
/