共用方式為


Column.DefaultConstraint 屬性

Gets a default value for the column.

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

語法

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

value = instance.DefaultConstraint
[SfcObjectAttribute(SfcObjectRelationship.ChildObject, SfcObjectCardinality.ZeroToOne, SfcObjectFlags.Design)]
public DefaultConstraint DefaultConstraint { get; internal set; }
[SfcObjectAttribute(SfcObjectRelationship::ChildObject, SfcObjectCardinality::ZeroToOne, SfcObjectFlags::Design)]
public:
property DefaultConstraint^ DefaultConstraint {
    DefaultConstraint^ get ();
    internal: void set (DefaultConstraint^ value);
}
[<SfcObjectAttribute(SfcObjectRelationship.ChildObject, SfcObjectCardinality.ZeroToOne, SfcObjectFlags.Design)>]
member DefaultConstraint : DefaultConstraint with get, internal set
function get DefaultConstraint () : DefaultConstraint 
internal function set DefaultConstraint (value : 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.

範例

使用資料庫物件

請參閱

參考

Column 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

CREATE TABLE (Transact-SQL)

條件約束