Remarque
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Cette fonctionnalité sera supprimée dans une prochaine version de Microsoft SQL Server. Évitez d'utiliser cette fonctionnalité dans de nouveaux travaux de développement, et prévoyez de modifier les applications qui utilisent actuellement cette fonctionnalité.
The EnumReferencingTables method returns a QueryResults object that enumerates user-defined tables on which a FOREIGN KEY constraint is defined.
Syntaxe
object
.EnumReferencingTables( [ IncludeAll ] ) as QueryResults
Parts
- object
Expression that evaluates to an object in the Applies To list.
- IncludeAll
TRUE or FALSE.
Prototype (C/C++)
HRESULT EnumReferencingTables(
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 a table on which a PRIMARY KEY or UNIQUE constraint is defined. |
referenced |
bit |
When 1, the table referenced by the Table object used depends on the listed in the result set. |
Notes
When IncludeAll is TRUE, the result set enumerates all tables on which FOREIGN KEY constraints are defined. The value of the result set column referenced determines FOREIGN KEY dependency on the referenced table.
When IncludeAll is FALSE (default), the result set enumerates only those tables that contain FOREIGN KEY constraints that depend on the referenced table.