This topic has not yet been rated - Rate this topic

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)]
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.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.