This content has been marked as final. Show 2 replies
I have a problem where getPrecision returns 0 when checking a new column. The column is a NUMBER(20,0) so it should return 20. I found that this only happens under specific circumstances. Here are the steps I took to reliably reproduce it.
1) Create a new table. The columns here don't matter.
2) alter the table and add a new column NUMBER(20) with a default value and set to not allow nulls
3) use getPrecision on the added column. It will return 0.
If there is no default value or the column allows nulls then getPrecision will return 20, the correct value. I am using the latest version of the jdbc drivers on a 10g database. Inserting data has no effect and getprecision will still return 0.
Is there a work around for this problem?
Edited by: 990226 on Feb 25, 2013 10:43 AM