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.
Originally posted by Gaurav Chikara: Can any one pls let me know as how can we generate random no in java with in certain range e.g. I want to generate random no between 1 and 3 Thankx in advance :roll: