sys.foreign_key_columns (Transact-SQL)sys.foreign_key_columns (Transact-SQL)
Anwendungsbereich:Applies to: SQL ServerSQL Server (alle unterstützten Versionen)
SQL ServerSQL Server (all supported versions)
Azure SQL-DatenbankAzure SQL Database
Azure SQL-DatenbankAzure SQL Database
Verwaltete Azure SQL-InstanzAzure SQL Managed Instance
Verwaltete Azure SQL-InstanzAzure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
Parallel Data WarehouseParallel Data Warehouse
Parallel Data WarehouseParallel Data Warehouse
SQL ServerSQL Server (alle unterstützten Versionen)
SQL ServerSQL Server (all supported versions)
Azure SQL-DatenbankAzure SQL Database
Azure SQL-DatenbankAzure SQL Database
Verwaltete Azure SQL-InstanzAzure SQL Managed Instance
Verwaltete Azure SQL-InstanzAzure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
Parallel Data WarehouseParallel Data Warehouse
Parallel Data WarehouseParallel Data Warehouse
Enthält eine Zeile für jede Spalte oder Spaltengruppe, die einen Fremdschlüssel enthält.Contains a row for each column, or set of columns, that comprise a foreign key.
SpaltennameColumn name | DatentypData type | BESCHREIBUNGDescription |
---|---|---|
constraint_object_idconstraint_object_id | intint | ID der FOREIGN KEY-Einschränkung.ID of the FOREIGN KEY constraint. |
constraint_column_idconstraint_column_id | intint | ID der Spalte oder der Spaltengruppe, die die FOREIGN KEY-Anweisung enthält (1..n , wobei n=Anzahl von Spalten).ID of the column, or set of columns, that comprise the FOREIGN KEY (1..n where n=number of columns). |
parent_object_idparent_object_id | intint | Die ID des übergeordneten Objekts der Einschränkung, das das verweisende Objekt darstellt.ID of the parent of the constraint, which is the referencing object. |
parent_column_idparent_column_id | intint | Die ID der übergeordneten Spalte, die die verweisende Spalte darstellt.ID of the parent column, which is the referencing column. |
referenced_object_idreferenced_object_id | intint | Die ID des Objekts, auf das verwiesen wird und das den Kandidatenschlüssel aufweist.ID of the referenced object, which has the candidate key. |
referenced_column_idreferenced_column_id | intint | Die ID der Spalte, auf die verwiesen wird (Kandidatenschlüsselspalte).ID of the referenced column (candidate key column). |
BerechtigungenPermissions
Die Sichtbarkeit der Metadaten in Katalogsichten ist auf sicherungsfähige Elemente eingeschränkt, bei denen der Benutzer entweder der Besitzer ist oder für die dem Benutzer eine Berechtigung erteilt wurde.The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. Weitere Informationen finden Sie unter Metadata Visibility Configuration.For more information, see Metadata Visibility Configuration.
Weitere InformationenSee Also
Katalogsichten für Objekte (Transact-SQL) Object Catalog Views (Transact-SQL)
Katalogsichten (Transact-SQL) Catalog Views (Transact-SQL)
FAQ: Abfragen des SQL Server-SystemkatalogsQuerying the SQL Server System Catalog FAQ