Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can Primary Key(s) be fond in ResultSet?

843854Feb 11 2004 — edited Feb 11 2004
Is it possible to find out the primary key(s) from ResultSet or ResultSetMetaData?
for (int j=1; j<=metaData.getColumnCount(); j++)
{	
     String type = metaData.getColumnTypeName(j);			
     String columnName = metaData.getColumnName(j);
     //  I want to know this column is primary key or not.
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 10 2004
Added on Feb 11 2004
2 comments
198 views