Permissions given by the GRANT statement are stored in the SYSTABLEPERM system view. Each row in this view corresponds to one table, one user ID granting the permission (grantor) and one user ID granted the permission (grantee). The underlying system table for this view is ISYSTABLEPERM.
Column name | Data type | Description |
---|---|---|
stable_id | UNSIGNED INT | The table number of the table or view to which the permissions apply. |
grantee | UNSIGNED INT | The user number of the user ID receiving the permission. |
grantor | UNSIGNED INT | The user number of the user ID granting the permission. |
selectauth | CHAR(1) | Indicates whether SELECT permission has been granted. Possible values are Y, N, or G. See the Remarks area below for more information about what these values mean. |
insertauth | CHAR(1) | Indicates whether INSERT permission has been granted. Possible values are Y, N, or G. See the Remarks area below for more information about what these values mean. |
deleteauth | CHAR(1) | Indicates whether DELETE permission has been granted. Possible values are Y, N, or G. See the Remarks area below for more information about what these values mean. |
updateauth | CHAR(1) | Indicates whether UPDATE permission has been granted for all columns in the table. Possible values are Y, N, or G. See the Remarks area below for more information about what these values mean. |
updatecols | CHAR(1) | Indicates whether UPDATE permission has only been granted for some of the columns in the underlying table. If updatecols has the value Y, there will be one or more rows in the SYSCOLPERM system view granting update permission for the columns. |
alterauth | CHAR(1) | Indicates whether ALTER permission has been granted. Possible values are Y, N, or G. See the Remarks area below for more information about what these values mean. |
referenceauth | CHAR(1) | Indicates whether REFERENCE permission has been granted. Possible values are Y, N, or G. See the Remarks area below for more information about what these values mean. |
There are several types of permission that can be granted. Each permission can have one of the following three values.
PRIMARY KEY (stable_id, grantee, grantor)
FOREIGN KEY (stable_id) references SYS.ISYSTAB (table_id)
FOREIGN KEY (grantor) references SYS.ISYSUSER (user_id)
FOREIGN KEY (grantee) references SYS.ISYSUSER (user_id)