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 difference in getColumnName ad getColumnLabel 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 "difference in getColumnName ad getColumnLabel" Watch "difference in getColumnName ad getColumnLabel" New topic

difference in getColumnName ad getColumnLabel

as chhipa

Joined: Sep 04, 2006
Posts: 26
There are two methods in java.sql.ResultSet interface

String getColumnName(int);
String getColumnLabel(int);
What is the difference between these two since in my case both of these methods are giving the same values.
Thank you
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1082

javadocs says
Gets the designated column's suggested title for use in printouts and displays.

Get the designated column's name

I don't think it is such hard that you can not try your own.


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