This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
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.