sp_pkeys

Description

Returns information about primary key constraints created with the create table or alter table command for a single table.

Syntax

sp_pkeys table_name [, table_owner] 
	[, table_qualifier]

Parameters

table_name

is the name of the table. The use of wildcard characters in pattern matching is not supported.

table_owner

is the name of the table owner. The use of wildcard characters in pattern matching is not supported. If table_owner is not specified, sp_pkeys looks for a table owned by the current user and then for a table owned by the Database Owner.

table_qualifier

is the name of the database that contains the table. This can be either the current database or NULL.

Usage

Permissions

Any user can execute sp_pkeys.