8.6.77 getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)
- Organization of this subsection
(1) Function
This method acquires information about access privileges for a table.
The information about access privileges that can be acquired depends on the privileges of the HADB user who executes this method. For details about the relationship between the privileges and the table information that can be acquired, see the topic Scope of information in dictionary tables and system tables that can be referenced by HADB users in the HADB Setup and Operation Guide.
(2) Format
public synchronized ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException
(3) Arguments
- String catalog
-
Specifies a catalog name. This argument is ignored, if specified.
- String schemaPattern
-
Specifies a schema name pattern#.
- String tableNamePattern
-
Specifies a table name pattern#.
- #
-
For details about the special characters that can be specified in each pattern, see (4) Special characters that can be specified in pattern character strings in 8.6.1 List of the methods in the DatabaseMetaData interface.
(4) Return value
The following table shows the format of the ResultSet object that is returned.
Column No. |
Type |
Column name |
Description |
---|---|---|---|
1 |
String |
TABLE_CAT |
Catalog name. The method always returns a null character string. |
2 |
String |
TABLE_SCHEM |
Schema name |
3 |
String |
TABLE_NAME |
Table name |
4 |
String |
GRANTOR |
User who grants access privilege |
5 |
String |
GRANTEE |
User who receives access privilege |
6 |
String |
PRIVILEGE |
Permitted access privilege name:
|
7 |
String |
IS_GRANTABLE |
Whether a user who has received an access privilege can grant access privileges to other HADB users
|
(5) Exceptions
If this Connection object is closed before this method is executed, the JDBC driver throws an SQLException.