DatabaseMetaData.getTables

DatabaseMetaData.getTables

Interface Overview | Interface Members | This Package | All Packages

Syntax
public abstract ResultSet getTables( String catalog, String schemaPattern, String tableNamePattern, String types[] ) throws SQLException
Parameters
catalog
a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schemaPattern
a schema name pattern; "" retrieves those without a schema
tableNamePattern
a table name pattern
types
a list of table types to include; null returns all types
Returns
ResultSet - each row is a table description
Description
Get a description of tables available in a catalog.

Only table descriptions matching the catalog, schema, table name and type criteria are returned. They are ordered by TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.

Each table description has the following columns:

  1. TABLE_CAT String => table catalog (may be null)
  2. TABLE_SCHEM String => table schema (may be null)
  3. TABLE_NAME String => table name
  4. TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
  5. REMARKS String => explanatory comment on the table

Note: Some databases may not return information for all tables.

Exceptions
SQLException if a database-access error occurs.
See Also
getSearchStringEscape