Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Number data type scale (Oracle, JDBC)
Hi,
I have a table created with statement:
CREATE TABLE test (field NUMBER);
I inserted one value into it:
INSERT INTO test VALUES (4);
According to Oracle documentation:
If a precision is not specified, the column stores values as given. If no scale is specified, the scale is zero.
I checked in database dictionary - DATA_LENGTH for column is set to NULL. However when I retrieve this data from database with JDBC, getScale() method of ResultSetMetaData class returns -127 which indicates double value.
When I run the same scenario against second database (almost similar environment). everything is fine - so JDBC driver is working properly.
What is the cause of such result? Is there an initialization parameter that determines default number data type scale?
My environment: Oracle 9.2, Red Hat Linux 9 with recompiled kernel (2.4.28).
Thanks for any help,
Tomek Received on Wed Feb 09 2005 - 09:57:22 CST