共用方式為


UserDefinedDataType.NumericPrecision 屬性

Gets or sets the maximum number of digits in a numeric value used in the definition of the user-defined data type.

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

語法

'宣告
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.ReadOnlyAfterCreation Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase Or SfcPropertyFlags.Design)> _
Public Property NumericPrecision As Integer 
    Get 
    Set
'用途
Dim instance As UserDefinedDataType 
Dim value As Integer 

value = instance.NumericPrecision

instance.NumericPrecision = value
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design)]
public int NumericPrecision { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::ReadOnlyAfterCreation|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase|SfcPropertyFlags::Design)]
public:
property int NumericPrecision {
    int get ();
    void set (int value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.ReadOnlyAfterCreation|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Design)>]
member NumericPrecision : int with get, set
function get NumericPrecision () : int 
function set NumericPrecision (value : int)

屬性值

型別:System.Int32
A Byte value that specifies the numerical precision of the user-defined data type.

備註

Numerical precision specifies the number of digits in a number. For example, the number 123.45 has a numerical precision of 5.

The numerical precision cannot be set to a value greater than the MaxLength property value.

範例

使用資料類型

請參閱

參考

UserDefinedDataType 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

資料類型 (Database Engine)

CREATE TYPE (Transact-SQL)