sp_table_privileges

Returns privilege information for all columns in a table or view.

Syntax

sp_table_privileges table_name [, table_owner[, table_qualifier]]

Parameters

Usage

The results set for sp_table_privileges is:

Column

Datatype

Description

table_qualifier

varchar(32)

The name of the database. This field can be NULL.

table_owner

varchar(32)

table_name

varchar(32)

NOT NULL.

grantor

varchar(32)

NOT NULL.

grantee

varchar(32)

NOT NULL.

privilege

varchar(32)

Identifies the table privilege. May be one of the following:
  • SELECT – The grantee is permitted to retrieve data for one or more columns of the table.

  • INSERT – The grantee is permitted to insert rows containing data.

  • UPDATE – The grantee is permitted to update the data in one or more columns of the table.

  • DELETE – The grantee is permitted to delete rows of data from the table.

  • REFERENCE – The grantee is permitted to refer to one or more columns of the table within a 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_table_privileges.