File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes getIndexInfo , how to get all columns that index applys on them ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "getIndexInfo , how to get all columns that index applys on them ?" Watch "getIndexInfo , how to get all columns that index applys on them ?" New topic
Author

getIndexInfo , how to get all columns that index applys on them ?

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 551
Hi
thank you for reading my post.
getIndexInfo is a method of DatabaseMetaData ,
how i can get all column that the index is applied on them ?
for example if there is an index which is created on 3 columns , how i extract them ?
thanks
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30353
    
150

Raminaa,
Get indexInfo returns a ResultSet object. The schema is listed in the API. For example, COLUMN_NAME is column #9. So you would just loop through the result set.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
jQuery in Action, 2nd edition
 
subject: getIndexInfo , how to get all columns that index applys on them ?