标签:
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException
Only column descriptions matching the catalog, schema, table and column name criteria are returned. They are ordered by TABLE_SCHEM
, TABLE_NAME
, and ORDINAL_POSITION
.
Each column description has the following columns:
null
)null
)NULL
valuesNULL
valuesnull
)null
)null
if DATA_TYPE isn‘t REF)null
if the DATA_TYPE isn‘t REF)null
if the DATA_TYPE isn‘t REF)null
if DATA_TYPE isn‘t DISTINCT or user-generated REF)
catalog
- a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null
means that the catalog name should not be used to narrow the searchschemaPattern
- a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null
means that the schema name should not be used to narrow the searchtableNamePattern
- a table name pattern; must match the table name as it is stored in the databasecolumnNamePattern
- a column name pattern; must match the column name as it is stored in the databaseResultSet
- each row is a column descriptionSQLException
- if a database access error occursgetSearchStringEscape()
ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException
仅返回与类别、模式、表和列名称标准匹配的列描述。它们根据 TABLE_SCHEM
、TABLE_NAME
和 ORDINAL_POSITION
进行排序。
每个列描述都有以下列:
TABLE_CAT String => 表类别(可为null
)null
)NULL
值NULL
值null
)null
)null
)null
)null
)null
)
catalog
- 类别名称,因为存储在数据库中,所以它必须匹配类别名称。该参数为 "" 则检索没有类别的描述,为 null
则表示该类别名称不应用于缩小搜索范围schemaPattern
- 模式名称的模式,因为存储在数据库中,所以它必须匹配模式名称。该参数为 "" 则检索那些没有模式的描述,为 null
则表示该模式名称不应用于缩小搜索范围tableNamePattern
- 表名称模式,因为存储在数据库中,所以它必须匹配表名称columnNamePattern
- 列名称模式,因为存储在数据库中,所以它必须匹配列名称ResultSet
- 每一行都是一个列描述SQLException
- 如果发生数据库访问错误getSearchStringEscape()
标签:
原文地址:http://www.cnblogs.com/wangjuneng/p/4467934.html