Column.AddDefaultConstraint Column.AddDefaultConstraint Column.AddDefaultConstraint Method

Definition

Adds a default constraint to the column.

Overloads

AddDefaultConstraint() AddDefaultConstraint() AddDefaultConstraint()

Adds a default constraint to the column.

AddDefaultConstraint(String) AddDefaultConstraint(String) AddDefaultConstraint(String)

Adds a default constraint to the column.

AddDefaultConstraint() AddDefaultConstraint() AddDefaultConstraint()

Adds a default constraint to the column.

public:
 Microsoft::SqlServer::Management::Smo::DefaultConstraint ^ AddDefaultConstraint();
public Microsoft.SqlServer.Management.Smo.DefaultConstraint AddDefaultConstraint ();
Public Function AddDefaultConstraint () As DefaultConstraint
Returns

A DefaultConstraint object that specifies the default constraint bound to the column.

Examples

Working with Database Objects

AddDefaultConstraint(String) AddDefaultConstraint(String) AddDefaultConstraint(String)

Adds a default constraint to the column.

public:
 Microsoft::SqlServer::Management::Smo::DefaultConstraint ^ AddDefaultConstraint(System::String ^ name);
public Microsoft.SqlServer.Management.Smo.DefaultConstraint AddDefaultConstraint (string name);
Public Function AddDefaultConstraint (name As String) As DefaultConstraint
Parameters
name
String String String

A String value that specifies the default constraint to add to the column.

Returns

A DefaultConstraint object that specifies the default constraint added to the column.

Examples

Working with Database Objects

Applies to