ForeignKey.MarkForDrop Method (Boolean)
Applies To: SQL Server 2016 Preview
Marks the foreign key to be dropped the next time its parent Table object is altered by the Alter method.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
public void MarkForDrop(
bool dropOnAlter
)
public:
virtual void MarkForDrop(
bool dropOnAlter
) sealed
abstract MarkForDrop :
dropOnAlter:bool -> unit
override MarkForDrop :
dropOnAlter:bool -> unit
Public Sub MarkForDrop (
dropOnAlter As Boolean
)
Parameters
dropOnAlter
Type: System.BooleanA Boolean value that specifies whether to drop the foreign key when its parent Table object is altered with the Alter method.
If True, the foreign key is dropped when the Alter method is run on the parent Table object.
If False, the foreign key is dropped immediately.
Implements
IMarkForDrop.MarkForDrop(Boolean)
Examples
Legacy Code Example
Creating, Altering, and Removing Foreign Keys
See Also
ForeignKey Class
Microsoft.SqlServer.Management.Smo Namespace
CREATE TABLE (Transact-SQL)
Unable to find linked topic '265bbe66-a36b-4eee-b6d4-f2972b7b2ba7'.
Return to top