Export (0) Print
Expand All

Column.IsForeignKey Property

Gets the Boolean property value that specifies whether the column is a foreign key.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Matrix)]
public bool IsForeignKey { get; }

Property Value

Type: Boolean
A Boolean value that specifies whether the column is a foreign key. If True, the column is a foreign key. Otherwise, False (default).

The foreign key is the column referenced by a primary key column in another table.

NoteNote

The value of the IsForeignKey property is always treated as false by columns based on the UserDefinedTableType object.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft