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)]
public bool IsForeignKey { get; }

Property Value

Type: System.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.

System_CAPS_noteNote

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

Return to top
Show: