I am trying to extract the JDBC database driver database metadata.
And now I come across a piece of documentation that I cannot explain to myself:
Method DatabaseMetaData.getColumns(...); ( JavaDoc ) contains two different nullability columns:
NULLABLE int => is NULL allowed.
columnNoNulls - might not allow NULL values
columnNullable - definitely allows NULL values
columnNullableUnknown - nullability unknown
and
IS_NULLABLE String => ISO rules are used to determine the nullability for a column.
YES --- if the column can include NULLs
NO --- if the column cannot include NULLs
empty string --- if the nullability for the column is unknown
The only idea I could think of for two different columns:
The one that defines the table column may be null when reading, and other states that can be inserted into this table column. But I could not determine the correctness of this idea.
Does anyone know for sure what the difference is between the two columns? Is there more details about this part of the JDBC API?
Thanks for the help.
source share