共用方式為


DefaultConstraint 屬性

Gets or sets a default value for the column.

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

語法

'宣告
<SfcObjectAttribute(SfcObjectRelationship.ChildObject, SfcObjectCardinality.ZeroToOne)> _
Public ReadOnly Property DefaultConstraint As DefaultConstraint
    Get
'用途
Dim instance As Column
Dim value As DefaultConstraint

value = instance.DefaultConstraint
[SfcObjectAttribute(SfcObjectRelationship.ChildObject, SfcObjectCardinality.ZeroToOne)]
public DefaultConstraint DefaultConstraint { get; }
[SfcObjectAttribute(SfcObjectRelationship::ChildObject, SfcObjectCardinality::ZeroToOne)]
public:
property DefaultConstraint^ DefaultConstraint {
    DefaultConstraint^ get ();
}
[<SfcObjectAttribute(SfcObjectRelationship.ChildObject, SfcObjectCardinality.ZeroToOne)>]
member DefaultConstraint : DefaultConstraint
function get DefaultConstraint () : DefaultConstraint

屬性值

型別:Microsoft.SqlServer.Management.Smo. . :: . .DefaultConstraint
A DefaultConstraint value that specifies a default value for the column.

備註

The DefaultConstraint property specifies a default text value for the column. When no value is supplied by the user, the default text value is inserted into a row in the table. The text value can be set by setting the Text property of the DefaultConstraint object that is referenced by the DefaultConstraint property.