共用方式為


DacDeployOptions.GenerateSmartDefaults 屬性

Get or set boolean that specifies whether default values should be generated to populate NULL columns that are constrained to NOT NULL values.

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

語法

'宣告
Public Property GenerateSmartDefaults As Boolean 
    Get 
    Set
'用途
Dim instance As DacDeployOptions 
Dim value As Boolean 

value = instance.GenerateSmartDefaults

instance.GenerateSmartDefaults = value
public bool GenerateSmartDefaults { get; set; }
public:
property bool GenerateSmartDefaults {
    bool get ();
    void set (bool value);
}
member GenerateSmartDefaults : bool with get, set
function get GenerateSmartDefaults () : boolean 
function set GenerateSmartDefaults (value : boolean)

屬性值

型別:System.Boolean
True if default values should be generated; otherwise false. Default is false.

備註

This is useful when needing to add a new NOT NULL column to an existing table with data.

請參閱

參考

DacDeployOptions 類別

Microsoft.SqlServer.Dac 命名空間