Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » Views » System views in Sybase Central

SYSTABCOL system view Next Page

SYSTABLEPERM system view


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.

Columns
Column name Column type Column constraint
stable_id UNSIGNED INT NOT NULL
grantee UNSIGNED INT NOT NULL
grantor UNSIGNED INT NOT NULL
selectauth CHAR(1) NOT NULL
insertauth CHAR(1) NOT NULL
deleteauth CHAR(1) NOT NULL
updateauth CHAR(1) NOT NULL
updatecols CHAR(1) NOT NULL
alterauth CHAR(1) NOT NULL
referenceauth CHAR(1) NOT NULL

There are several types of permission that can be granted. Each permission can have one of the following three values.

Permissions

The grantee might have been given permission for the same table by another grantor. If so, this information would be found in a different row of the SYSTABLEPERM system view.

stable_id    The table number of the table or view to which the permissions apply.

grantee    The user number of the user ID receiving the permission.

grantor    The user number of the user ID granting the permission.

selectauth (Y/N/G)    Indicates whether SELECT permission has been granted.

insertauth (Y/N/G)    Indicates whether INSERT permission has been granted.

deleteauth (Y/N/G)    Indicates whether DELETE permission has been granted.

updateauth (Y/N/G)    Indicates whether UPDATE permission has been granted for all columns in the table.

updatecols (Y/N)    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 (Y/N/G)    Indicates whether ALTER permission has been granted.

referenceauth (Y/N/G)    Indicates whether REFERENCE permission has been granted.

Constraints on underlying system table

PRIMARY KEY (stable_id, grantee, grantor)

FOREIGN KEY (stable_id) references SYS.ISYSTAB (table_id)

FOREIGN KEY (ttable_id) references SYS.ISYSTAB (table_id)

FOREIGN KEY (grantor) references SYS.ISYSUSER (user_id)

FOREIGN KEY (grantee) references SYS.ISYSUSER (user_id)