Oracle ResultSetMetaData getPrecision/getScale
I'm using Oracle's JDBC thin driver (10.2.0.3) for connecting to an Oracle 10g database. I'd like to get information about the database columns, so I use ResultSetMetaData . The most important information I need is the type of the column and the length, so I use getColumnType , getPrecision , and getScale methods. It works for a simple query ( select * from tablename ) if the column type is "simple" like VARCHAR2(50), NUMBER(5), NUMBER(6,2) . If I have a more complex query ( select count(*) from tablename ) or a query based on a view which contains some complex calculation, the methods give