Hi, to get the primary keys directly from the databasemetadata is not possible. You can get the primary key with the method getPrimaryKeys(String catalog, String schema, String table). This method returns a resultset witht primary keys. Since there isn't a primary key object will the resultset exists of primary key names. For more information see javadoc about the DatabaseMateData object.
subject: how to display primary keys from metadata