sp_column_privileges

Returns permissions information for one or more columns in a table or view.

Syntax

sp_column_privileges table_name [, table_owner
	[, table_qualifier [, column_name]]]

Parameters

Examples

Usage

The results set for sp_column_privileges is:

Column

Datatype

Description

table_qualifier

varchar(32)

The name of the database in which the table specified for the table_name parameter is stored.

table_owner

varchar(32)

The table owner. If no value was specified for the table_owner parameter, this value is the current owner or the Database Owner.

table_name

varchar(32)

The name specified for the table_name parameter. This value cannot be NULL.

column_name

varchar(32)

The specified column name. If no column name was specified in the statement, the results include all columns in the specified table.

grantor

varchar(32)

The name of the database user who has granted permissions on column_name to grantee. This value cannot be NULL.

grantee

varchar(32)

The name of the database user who was granted permissions on column_name by grantor. This value cannot be NULL.

privilege

varchar(32)

Identifies the column privilege. May be one of the following:

  • SELECT – The grantee is permitted to retrieve data for the column.

  • UPDATE – The grantee is permitted to update data in the column.

  • REFERENCE – The grantee is permitted only for referential constraint.

is_grantable

varchar(3)

Indicates whether the grantee is permitted to grant the privilege to other users. The values are YES, NO, and NULL.

Permissions

Any user can execute sp_column_privileges.