My Oracle Support Banner

DatabaseMetaData Returns Wrong Data Type For Timestamp Column (Doc ID 1616553.1)

Last updated on FEBRUARY 03, 2019

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


There is a table T with the following column description.
SQL> desc T;
Name             Null?    Type
---------------- -------- --------------
C_TIMESTAMP_0             TIMESTAMP(0)
C_TIMESTAMP_1             TIMESTAMP(1)
C_TIMESTAMP_2             TIMESTAMP(2)
C_TIMESTAMP_9             TIMESTAMP(9)

Using rs.getString("DATA_TYPE")) with JDBC driver returns wrong data type 1111 for all timestamp columns with fractional_seconds_precision 0..5, and 7..9. Only the fractional_seconds_precision 6 returns the correct data type 93.



To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.