Hi,
I have tested this with a few databases, and I think 23502 is the most standard SQLState. Test case: create table test(id int, data varchar(255) not null); insert into test values(1, null). Result:
jdbc:h2:mem:
SQLState: 23502
ErrorCode: 23502
Message: NULL not allowed for column "DATA"
jdbc:hsqldb:/tmp/db/test
SQLState: 23502
ErrorCode: -10
Message: integrity constraint violation: NOT NULL check constraint; SYS_CT_10028 table: TEST column: DATA
jdbc:derby:/tmp/db/test2;create=true
SQLState: 23502
ErrorCode: 30000
Message: Column 'DATA' cannot accept a NULL value.
jdbc:mysql://localhost:3306/test
SQLState: 23000
ErrorCode: 1048
Message: Column 'data' cannot be null
jdbc:postgresql:test
SQLState: 23502
ErrorCode: 0
Message: ERROR: null value in column "data" violates not-null constraint
Regards,
Thomas