List of usage examples for java.sql DatabaseMetaData getPseudoColumns
ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern,
String columnNamePattern) throws SQLException;
From source file:Test.java
public static void main(String[] args) throws Exception { Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/contact", "userName", "password"); DatabaseMetaData metaData = con.getMetaData(); ResultSet resultSet = metaData.getPseudoColumns("", "schemaName", "tableName", ""); while (resultSet.next()) { System.out.println(resultSet.getString("TABLE_SCHEM ") + " - " + resultSet.getString("COLUMN_NAME ")); }// w w w .j a v a 2s . c o m }