- Role assignments
- Administrative permissions
- Object-level access
YES or NO will be returned, based on whether the given user
has the specified permissions or not, either directly or through a role or
administrative access.
Row/Column-level permission
information will be returned after the YES, if applicable.
CHECK PERMISSION Syntax
CHECK ROLE Syntax
Parameters
<permission>
<permission>
Permission to verify for the given userSupported permissions include:
| Permission | Description |
|---|---|
ADMIN | ALL | Applicable to credential objects and tables (or views) |
CONNECT | Applicable to external data sources |
DELETE | Applicable to tables |
EXECUTE | Applicable to User-Defined Functions (UDFs) and SQL stored procedures |
INSERT | Applicable to tables |
READ | Applicable to credential objects |
SELECT | Applicable to tables (or views) |
SYSTEM ADMIN | System admin permission |
SYSTEM CREATE | System create permission |
SYSTEM MONITOR | System monitor permission |
SYSTEM READ | System read permission |
SYSTEM WRITE | System write permission |
UPDATE | Applicable to tables |
USER ADMIN | User admin permission |
PERMISSION
PERMISSION
Optional keyword for clarity
ON
ON
Keyword for specifying the optional ON clause, which checks for the specified
permission
on the following target (and optional target type) given in this clause<target type>
<target type>
Optional keyword for specifying the object type of the target; may be necessary to disambiguate
same-named objects of differing typesSupported target types include:
| Target Type | Description |
|---|---|
CONTEXT | SQL-GPT context object |
CREDENTIAL | Credential object |
DATA SINK | External data source |
DATA SOURCE | External data source |
DIRECTORY | KiFS directory |
FUNCTION | User-Defined Function (UDF) |
GRAPH | Graph |
PROCEDURE | SQL stored procedure |
SCHEMA | Schema |
STREAM | Stream |
TABLE | Table (or view) |
<target>
<target>
Name of the object to which the given user’s specified permission will be checked
<role>
<role>
Name of the role of which the given user’s membership will be checked
FOR <user>
FOR <user>
Optional FOR clause, which checks whether the specified permission/role exists for the
user
given in this clause; if omitted, the current user will be checkedIF EXISTS
IF EXISTS
Optional error suppression clause, which causes the check to return
No if any of the entities
specified do not exist; without this clause, non-existent entities will return an error