#72 NULL-Anomaly detection wrong for Oracle


When querying all_tab_columns in Oracle, the values NULL and 'NULL' (as well as all variants with different case) signify a default value of NULL. Only a data_default of '''NULL''' (as well as all variants with different case) represents a string default value, and thus an anomaly. See attached null_default_example.sql for examples.

A special case for Oracle in DbAnalyzer.getDefaultNullStringColumns could solve this.

Tested on Oracle 11g


  • Comment has been marked as spam. 

    You can see all pending comments posted by this user  here

    Anonymous - 2010-09-29

    Example of Oracle's null default behavior

  • John Currier

    John Currier - 2010-09-29

    The problem is that DatabaseMetaData.getColumns() changed what it returned for this at some point, so depending on what version of JDBC you're using you'll get different results for this. In other words it's not an Oracle-specific thing.

    I can either attempt to determine the rules based on the version of JDBC (assuming all drivers follow the correct rules for each version and that I can find the documented rules per version somewhere), or I can just remove the anomaly.



Log in to post a comment.