次の方法で共有


EnumReferencedTables Method

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。 新しい開発作業では、この機能の使用を避け、現在この機能を使用しているアプリケーションは修正するようにしてください。

The EnumReferencedTables method returns a QueryResults object that enumerates tables on which a PRIMARY KEY or UNIQUE constraint is defined.

構文

object.EnumReferencedTables( [ IncludeAll ] ) as QueryResults

Parts

  • object
    Expression that evaluates to an object in the Applies To list

  • IncludeAll
    TRUE or FALSE

Prototype (C/C++)

HRESULT EnumReferencedTables(
LPSQLDMOQUERYRESULTS* ppResults,
BOOL IncludeAllCandidates = NULL);

Returns

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

Column

Data type

Description

candidate_key

nvarchar(129)

Not applicable. Contains the string N/A.

candidate_table

nvarchar(262)

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

referenced

bit

When 1, the table referenced by the Table object used depends on the result-set listed table in a FOREIGN KEY relationship.

説明

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

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

Applies To: