Returns privilege information for one or more database objects.
sp_table_privileges table_name [, table_owner] [, table_qualifier]
is the name of the table. Use the wildcard character to request information about more than one table. Aliases are not supported.
is the owner of the database object about which column privilege information is requested. Use the wildcard character to request information about tables owned by more than one user. If you do not specify this parameter, sp_table_privileges looks first for a table owned by the current user and then for a table owned by the database owner.
is ignored. Leave blank or set to NULL.
The DB2 access service selects information from the SYSTABAUTH system catalog table.
This function corresponds to the ODBC function SQLTablePrivileges.
sp_table privileges returns a list of one or more database objects with privilege information about each. Results are ordered by the following columns:
TABLE_OWNER
TABLE_NAME
PRIVILEGE
The lengths for varchar columns shown in the result set tables are maximums; the actual lengths depend on the target database.
The following table shows the result set.
Column name |
Datatype |
Notes |
---|---|---|
TABLE_QUALIFIER |
varchar (128) |
Always NULL. |
TABLE_OWNER |
varchar (128) |
Table owner identifier (authorization ID). |
TABLE_NAME |
varchar (128) NOT NULL |
Name of the database object about which privilege information is returned. |
GRANTOR |
varchar (128) |
Identifies the user who granted this privilege; NULL if not applicable to the target database. |
GRANTEE |
varchar (128) NOT NULL |
Identifies the user to whom this privilege was granted. |
PRIVILEGE |
varchar (128) NOT NULL |
Identifies the privilege granted to the grantee on this object as one of the following values:
|
IS_GRANTABLE |
varchar (3) |
Indicates whether the grantee is authorized to grant privilege on this object to others users with one of the following values:
|
Copyright © 2005. Sybase Inc. All rights reserved. |