DataType.SmallInt Property

Gets a data type that specifies the SmallInt definition used in the data type.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Shared ReadOnly Property SmallInt As DataType
    Get
'Usage
Dim value As DataType

value = DataType.SmallInt
public static DataType SmallInt { get; }
public:
static property DataType^ SmallInt {
    DataType^ get ();
}
static member SmallInt : DataType
static function get SmallInt () : DataType

Property Value

Type: Microsoft.SqlServer.Management.Smo.DataType
A DataType object value that specifies a SmallInt definition in the data type.

Remarks

A SmallInt is an integer that is stored in 2 bytes. The maximum value is 32,767. The minimum value is -32,767.

Examples

Visual Basic

Dim dt As DataType
dt = New DataType(SqlDataType.SmallInt)

PowerShell

$dt = new-object Microsoft.SqlServer.Management.Smo.DataType([Microsoft.SqlServer.Management.Smo.SqlDataType]::SmallInt)