Share via


EnumReferencedKeys Method

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The EnumReferencedKeys method returns a QueryResults object that enumerates the PRIMARY KEY and UNIQUE constraints.

구문

object
.EnumReferencedKeys( [ ReferencedTable ] , [ IncludeAll ] )as QueryResults

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • ReferencedTable
    Optional. String that names an existing Microsoft SQL Server table. Restricts result set membership to list only references to objects defined on the specified table.
  • IncludeAll
    TRUE or FALSE.

Prototype (C/C++)

HRESULT EnumReferencedKeys(
LPSQLDMOQUERYRESULTS* ppResults,
SQLDMO_LPCSTR ReferencedTableName = NULL,
BOOL IncludeAllCandidates = NULL);

Returns

A QueryResults object that contains one result set defined by these columns.

Column Data type Description

candidate_key

nvarchar(129)

Name of a PRIMARY KEY or UNIQUE constraint.

candidate_table

nvarchar(262)

Name of a table on which a PRIMARY KEY or UNIQUE constraint is defined.

referenced

bit

When 1, the table depends on the PRIMARY KEY or UNIQUE constraint listed in the result set.

주의

When IncludeAll is TRUE, the result set enumerates all PRIMARY KEY and UNIQUE constraints defined in the database. The value of the result set column referenced determines table object dependency on the listed PRIMARY KEY or UNIQUE constraint.

When IncludeAll is FALSE (default), the result set enumerates only those PRIMARY KEY or UNIQUE constraints on which the table depends.

Applies To:

Table Object