The GRANT statement can give UPDATE, SELECT, or REFERENCES permission to individual columns in a table. Each column with UPDATE, SELECT, or REFERENCES permission is recorded in one row of the SYSCOLPERM system view. The underlying system table for this view is ISYSCOLPERM.
Column name | Column type | Column constraint |
---|---|---|
table_id | UNSIGNED INT | NOT NULL |
grantee | UNSIGNED INT | NOT NULL |
grantor | UNSIGNED INT | NOT NULL |
column_id | UNSIGNED INT | NOT NULL |
privilege_type | SMALLINT | NOT NULL |
is_grantable | CHAR(1) | NOT NULL |
table_id The table number for the table containing the column.
grantee The user number of the user ID that is given permission on the column. If the grantee is the user number for the special PUBLIC user ID, the permission is given to all user IDs.
grantor The user number of the user ID that grants the permission.
column_id This column number, together with the table_id, identifies the column for which permission has been granted.
privilege_type The number in this column indicates the kind of column permission (16=REFERENCES, 1=SELECT, or 8=UPDATE).
is_grantable (Y/N) Indicates if the permission on the column was granted WITH GRANT OPTION.
PRIMARY KEY (table_id, grantee, grantor, column_id, privilege_type)
FOREIGN KEY (table_id, column_id) references SYS.ISYSTABCOL (table_id, column_id)
FOREIGN KEY (grantor) references SYS.ISYSUSER (user_id)
FOREIGN KEY (grantee) references SYS.ISYSUSER (user_id)