create user u_hajo identified by hajo default tablespace users; grant connect, resource to u_hajo; conn u_hajo/hajo create table t_hajo ( col1 number, col2 varchar2(10) ); insert into t_hajo values ( 1, 'one'); insert into t_hajo values ( 2, null); select * from t_hajo where col2 is null; alter table t_hajo modify (col2 constraint col2_nn not null); --> will fail because of existing null values update t_hajo set col2 = 'xxx' where col2 is null; alter table t_hajo modify (col2 constraint col2_nn not null); conn / as sysdba drop user u_hajo cascade;