DatabaseMetaData.getTablePrivileges
Interface Overview | Interface Members |
This Package |
All Packages
public abstract ResultSet getTablePrivileges( String catalog,
String schemaPattern,
String tableNamePattern ) 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
Returns
ResultSet - each row is a table privilege description
Description
Get a description of the access rights for each table available
in a catalog. Note that a table privilege applies to one or
more columns in the table. It would be wrong to assume that
this priviledge applies to all columns (this may be true for
some systems but is not true for all.)
Only privileges matching the schema and table name
criteria are returned. They are ordered by TABLE_SCHEM,
TABLE_NAME, and PRIVILEGE.
Each privilige description has the following columns:
- TABLE_CAT String => table catalog (may be null)
- TABLE_SCHEM String => table schema (may be null)
- TABLE_NAME String => table name
- GRANTOR => grantor of access (may be null)
- GRANTEE String => grantee of access
- PRIVILEGE String => name of access (SELECT,
INSERT, UPDATE, REFRENCES, ...)
- IS_GRANTABLE String => "YES" if grantee is permitted
to grant to others; "NO" if not; null if unknown
Exceptions
SQLException
if a database-access error occurs.
See Also
getSearchStringEscape