Definition:- You are trying to insert a null value which have not null constraint for department_name column define for it.
you will have to specified value for this column or give a default value for it.
Example:-
DECLARE
insert_excep EXCEPTION;
PRAGMA EXCEPTION_INIT (insert_excep, -01400);
BEGIN
INSERT INTO departments (department_id, department_name) VALUES (280, NULL);
EXCEPTION
WHEN insert_excep THEN
DBMS_OUTPUT.PUT_LINE('INSERT OPERATION FAILED');
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
0 comments:
Post a Comment
Thank you for your comments we will get back to soon