My Oracle Support Banner

JDBC Metadata GetColumnName Truncating when Using an Alias (Doc ID 290165.1)

Last updated on AUGUST 03, 2016

Applies to:

JDBC - Version:
This problem can occur on any platform.


You get metadata using JDBC from the following table:


The developer executes the following query: "select to_char(col1, 'yyyymmdd') ,
to_char(HOST_MESSAGE_DATETIME,'hh24miss') from testdate" from a Java
application and uses the following method: "getColumnName()" in order to get
back the column names used in that query.

The result of the "getColumnName()" was the following:
Metadata information...
Index => 1
Column name => TO_CHAR(COL1,YYYYMMDD)
Index => 2
Column name => TO_CHAR(HOST_MESSAGE_DATETIME, [****]
Closing rset...
Closing stmt...
Closing conn...
End of program

The second column name was truncated(see [****])


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.