DECLARE
e_nullcol EXCEPTION;
PRAGMA exception_init ( e_nullcol, -1400 ); -- Fehlernummer bereits von Oracle vergeben
BEGIN
INSERT INTO dept VALUES (
NULL,
'TRAINING',
'FRANKFURT'
);
EXCEPTION
WHEN e_nullcol THEN
dbms_output.put_line('NOT-NULL-Column is missing !');
END;
/