Stop doing it. Watch.
CREATE TABLE tAs HillbillyToad said,
CONSTRAINT pk_id PRIMARY KEY
SH@I_HAVE_NO_IDEA>INSERT INTO t ( id ) VALUES ( 1 );
1 row created.
SH@I_HAVE_NO_IDEA>INSERT INTO t ( id ) VALUES ( NULL );
INSERT INTO t ( id ) VALUES ( NULL )
ERROR at line 1:
ORA-01400: cannot insert NULL into ("SH"."T"."ID")
It is better than no constraint, that's for sure. The heart was in the right place...