How can I get information about foreign keys used in a table?

Joe Sam Shirah

DatabaseMetaData.getImportedKeys() returns a ResultSet with data about foreign key columns, tables, sequence and update and delete rules. For sample code, look at ForeignKeysCoffees.java in the download from Are the code examples from the JDBC API Tutorial and Reference, Second Edition available online?