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
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 "
Hi,
I believe H2 should throw SQLState 2201C instead of 23502 when users
attempt to insert NULL into a column that disallows it.
H2's documentation can be found here:
http://www.h2database.com/javadoc/org/h2/constant/ErrorCode.html#c23502
SQLState 2201C is defined as "null row not permitted in