DatabaseMetaData.getColumnPrivileges

DatabaseMetaData.getColumnPrivileges

Interface Overview | Interface Members | This Package | All Packages

Syntax
public abstract ResultSet getColumnPrivileges( String catalog, String schema, String table, String columnNamePattern ) throws SQLException
Parameters
catalog
a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schema
a schema name; "" retrieves those without a schema
table
a table name
columnNamePattern
a column name pattern
Returns
ResultSet - each row is a column privilege description
Description
Get a description of the access rights for a table's columns.

Only privileges matching the column name criteria are returned. They are ordered by COLUMN_NAME and PRIVILEGE.

Each privilige 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. COLUMN_NAME String => column name
  5. GRANTOR => grantor of access (may be null)
  6. GRANTEE String => grantee of access
  7. PRIVILEGE String => name of access (SELECT, INSERT, UPDATE, REFRENCES, ...)
  8. 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