Share via


ReferentialAction Enum

Definition

The action that a database may take when handling a foreign key constraint as part of an update or delete.

public enum ReferentialAction
type ReferentialAction = 
Public Enum ReferentialAction
Inheritance
ReferentialAction

Fields

Name Value Description
NoAction 0

Do nothing. That is, just ignore the constraint.

Restrict 1

Don't perform the action if it would result in a constraint violation and instead generate an error.

Cascade 2

Cascade the action to the constrained rows.

SetNull 3

Set null on the constrained rows so that the constraint is not violated after the action completes.

SetDefault 4

Set a default value on the constrained rows so that the constraint is not violated after the action completes.

Remarks

Note that some database engines do not support or correctly honor every action.

Applies to