Export (0) Print
Expand All

ForeignKey.DeleteAction Property

Gets or sets the action taken when the row that is referenced by the foreign key is deleted.

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

[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design|SfcPropertyFlags.Matrix)]
public ForeignKeyAction DeleteAction { get; set; }

Property Value

Type: Microsoft.SqlServer.Management.Smo.ForeignKeyAction
A ForeignKeyAction value that specifies the action taken when the row that is referenced by the foreign key is deleted.

The DeleteAction property can be used to specify that the action is cascaded. This means that the foreign key row is also deleted. You can also set the foreign key to the default value, or set it to Null.

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

Community Additions

ADD
Show:
© 2014 Microsoft