Share via


SqlType Enumeration

Defines the SQL Server built-in data types.

Namespace:  Microsoft.Data.Schema.Sql.SchemaModel
Assembly:  Microsoft.Data.Schema.Sql (in Microsoft.Data.Schema.Sql.dll)

Syntax

'Declaration
Public Enumeration SqlType
public enum SqlType
public enum class SqlType
type SqlType
public enum SqlType

Members

Member name Description
Unknown Nothing was defined.
BigInt Integer (whole number) data from -2^63 (-9,223,372,036,854,775,808) through 2^63-1 (9,223,372,036,854,775,807).
Int Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 - 1 (2,147,483,647).
SmallInt Integer data from -2^15 (-32,768) through 2^15 - 1 (32,767).
TinyInt Integer data from 0 through 255.
Bit Integer data with either a 1 or 0 value.
Decimal Fixed precision and scale numeric data from -10^38 +1 through 10^38 –1.
Numeric Functionally equivalent to decimal.
Money Monetary data values from -2^63 (-922,337,203,685,477.5808) through 2^63 - 1 (+922,337,203,685,477.5807), with accuracy to a ten-thousandth of a monetary unit.
SmallMoney Monetary data values from -214,748.3648 through +214,748.3647, with accuracy to a ten-thousandth of a monetary unit.
Float Floating precision number data with the following valid values: -1.79E + 308 through -2.23E - 308, 0 and 2.23E + 308 through 1.79E + 308.
Real Floating precision number data with the following valid values: -3.40E + 38 through -1.18E - 38, 0 and 1.18E - 38 through 3.40E + 38.
DateTime Date and time data from January 1, 1753, through December 31, 9999, with an accuracy of three-hundredths of a second, or 3.33 milliseconds.
SmallDateTime Date and time data from January 1, 1900, through June 6, 2079, with an accuracy of one minute.
Char Fixed-length non-Unicode character data with a maximum length of 8,000 characters.
VarChar Variable-length non-Unicode data with a maximum length of 8,000 characters.
Text Variable-length non-Unicode data with a maximum length of 2^31 - 1 (2,147,483,647) characters.
NChar Fixed-length Unicode data with a maximum length of 4,000 characters.
NVarChar Variable-length Unicode data with a maximum length of 4,000 characters. sysname is a system-supplied user-defined data type that is functionally equivalent to nvarchar(128) and that is used to reference database object names.
NText Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters.
Binary Fixed-length binary data with a maximum length of 8,000 bytes.
VarBinary Variable-length binary data with a maximum length of 8,000 bytes.
Image Variable-length binary data with a maximum length of 2^31 - 1 (2,147,483,647) bytes.
Cursor A reference to a cursor.
Variant A data type that stores values of various SQL Server-supported data types, except text, ntext, timestamp, and sql_variant.
Table A special data type that stores a result set for later processing.
Timestamp A database-wide unique number that is updated every time that a row is updated.
UniqueIdentifier A 16-byte GUID.
Xml XML data type.
Date Date only.
Time Time only.
DateTime2 Combination of date and time types.

Provides better precision than DateTime.

DateTimeOffset Same as DateTime2 with a time zone offset added.

See Also

Reference

Microsoft.Data.Schema.Sql.SchemaModel Namespace