Поделиться через


Свойство 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)

Ограничения