aspose file tools
The moose likes JDBC and the fly likes Finding primary key Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Finding primary key" Watch "Finding primary key" New topic
Author

Finding primary key

Shashikanth Ravulapelli
Greenhorn

Joined: May 09, 2001
Posts: 1
Is there any way to find out Primary key from a resultset. I looked in ResultSetMetaData and ResultSet interfaces, and couldn't find any. My problem is to copy a row in one of the table, which has a primary key. During insertion time, you cannot specify a value for Primary key column and i would like to skip the value in the result set which is a value for the primary key.


shashi
Yogen Vadnere
Ranch Hand

Joined: Sep 20, 2001
Posts: 58
Hello,
DatabaseMetaData has two methods
getPrimaryKeys(String catalog, String schema, String table)
Hope this will work for u..

Yogen Vadnere
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Finding primary key
 
Similar Threads
Undefined Primary Key
to find the primary key of a table
find & Select
strange problem...help!!!!!
hibernate mapping xml issue.