Contents Index SYSTABLE system table SYSTRIGGER system table

ASA SQL Reference
  System Tables

SYSTABLEPERM system table


Column name Column type Column constraint Table constraints
stable_id UNSIGNED INT NOT NULL Primary key, foreign key references SYSTABLE table_id
grantee UNSIGNED INT NOT NULL Primary key, foreign key references SYSUSERPERM.user_id
grantor UNSIGNED INT NOT NULL Primary key, foreign key references SYSUSERPERM.user_id
ttable_id UNSIGNED INT NOT NULL Foreign key references SYSTABLE table_id
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

Permissions given by the GRANT command are stored in SYSTABLEPERM. Each row in this table corresponds to one table, one user ID granting the permission (grantor) and one user ID granted the permission (grantee).

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 recorded in a different row of SYSTABLEPERM.

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

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

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

ttable_id    In the current version of Adaptive Server Anywhere, this table number is always the same as stable_id.

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. (Only UPDATE permission can be given on individual columns. All other permissions are for all columns in a table.)

updatecols (Y/N)    Indicates whether UPDATE permission has only been granted for some of the columns in the table. If updatecols has the value Y, there will be one or more rows in SYSCOLPERM granting update permission for the columns in this table.

alterauth (Y/N/G)    Indicates whether ALTER permission has been granted.

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


Contents Index SYSTABLE system table SYSTRIGGER system table