getSchemas Method (String, String)

Retrieves the schema names that are available in the current database by using the specified catalog name and the schema name.

Hinweis

This feature is introduced starting with the Microsoft SQL Server JDBC Driver version 2.0.

public ResultSet getSchemas(java.lang.String catalog,
                       java.lang.String schemaPattern)

Parameter

catalog

The name of a catalog in the database. If it is an empty string "", the result includes the schemas without a catalog. If it is null, the catalog name is not used for search.

schemaPattern

The name of a schema. If it is null, the schema name is not used for search.

Rückgabewert

A SQLServerResultSet object.

Ausnahmen

SQLServerException

Hinweise

This getSchemas method is specified by the getSchemas method in the java.sql.DatabaseMetaData interface.

The result set returned by the getSchemas method contains the following information:

Name Type Description

TABLE_SCHEM

String

The name of the schema.

TABLE_CATALOG

String

The catalog name for the schema.

The results are ordered by TABLE_CATALOG and then TABLE_SCHEM. Each row has TABLE_SCHEM as the first column and TABLE_CATALOG as the second column.

Siehe auch

Referenz

SQLServerDatabaseMetaData Class

Konzepte

SQLServerDatabaseMetaData Methods
SQLServerDatabaseMetaData Members