Skip to main content
Users (or the current user) can have their effective permissions checked, including:
  • Role assignments
  • Administrative permissions
  • Object-level access
A result of 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 to verify for the given userSupported permissions include:
PermissionDescription
ADMIN | ALLApplicable to credential objects and tables (or views)
CONNECTApplicable to external data sources
DELETEApplicable to tables
EXECUTEApplicable to User-Defined Functions (UDFs) and SQL stored procedures
INSERTApplicable to tables
READApplicable to credential objects
SELECTApplicable to tables (or views)
SYSTEM ADMINSystem admin permission
SYSTEM CREATESystem create permission
SYSTEM MONITORSystem monitor permission
SYSTEM READSystem read permission
SYSTEM WRITESystem write permission
UPDATEApplicable to tables
USER ADMINUser admin permission

PERMISSION

Optional keyword for clarity

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>

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 TypeDescription
CONTEXTSQL-GPT context object
CREDENTIALCredential object
DATA SINKExternal data source
DATA SOURCEExternal data source
DIRECTORYKiFS directory
FUNCTIONUser-Defined Function (UDF)
GRAPHGraph
PROCEDURESQL stored procedure
SCHEMASchema
STREAMStream
TABLETable (or view)

<target>

Name of the object to which the given user’s specified permission will be checked

<role>

Name of the role of which the given user’s membership will be checked

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 checked

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