This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 30138
    
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getIndexInfo , how to get all columns that index applys on them ?
 
Similar Threads
Confusion in creating indexes
Error in retrieving data using java from Column whose name is a reserved word in SQL
How to determine 1:1, 1:M etc. relationships using DatabaseMetaData
can we get index name ?
A few doubts