Sample Header Ad - 728x90

H2 SELECT NULLABLE or other equivalent to check a column has NOT NULL constraint or not

0 votes
1 answer
3194 views
I would like to check if a column has a NOT NULL constraint in order to start an automated upgrade of the table definition. However in H2 the SQL SELECT NULLABLE FROM TABLE_NAME doesn't return me the NOT NULL columns and I don't seem to find anything similar to check the constraint on the table columns. Notice I don't want to check the NOT NULL column values with something like SELECT COLUMN FROM TABLE WHERE COLUMN IS NOT NULL! I want to check the table definition for that specific column. thank you
Asked by dendini (395 rep)
Mar 28, 2013, 09:31 AM
Last activity: Mar 28, 2013, 09:48 AM