File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes ResultSetMetaData Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "ResultSetMetaData" Watch "ResultSetMetaData" New topic


Chinmay Bajikar
Ranch Hand

Joined: Dec 08, 2001
Posts: 159
What is the way to get the column alias being used in the query when you are using the ResultSetMetaData object?
I suspect it is getLabel()?

Thanks ,

The strength of the Wolf is the pack & the strength of the pack is the wolf....Rudyard Kipling
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1082

I haven't tried this but I guess that getColumnLabel(int column) of ResultSetMetaData will give you result


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
I agree. Here's the link:
subject: ResultSetMetaData
It's not a secret anymore!