Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34681
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic