共用方式為


AddDefaultConstraint 方法

Adds a default constraint to the column.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Function AddDefaultConstraint As DefaultConstraint
'用途
Dim instance As Column
Dim returnValue As DefaultConstraint

returnValue = instance.AddDefaultConstraint()
public DefaultConstraint AddDefaultConstraint()
public:
DefaultConstraint^ AddDefaultConstraint()
member AddDefaultConstraint : unit -> DefaultConstraint 
public function AddDefaultConstraint() : DefaultConstraint

傳回值

型別:Microsoft.SqlServer.Management.Smo. . :: . .DefaultConstraint
A DefaultConstraint object that specifies the default constraint bound to the column.