SQLDBTYPE and .NET data type comparison table

xiaoxiao2021-03-06  42

Member name

Description

Bigint

Supported by .NET Framework.

Int64

A 64-bit sign integer.

Binary

Supported by .NET Framework.

Array type is Byte

The fixed length stream of binary data is between 1 and 8,000 bytes.

Bit

Supported by .NET Framework.

Boolean

No symbol values, can be 0, 1 or empty reference (Nothing in Visual Basic).

Charr

Supported by .NET Framework.

String

The fixed length stream of non-Unicode characters ranges from 1 to 8,000 characters.

Datetime

Supported by .NET Framework.

Datetime

Date and time data, the value range from January 1, 1999 to December 31, 9999, with a precision of 3.33 ms.

Decimal

Supported by .NET Framework.

Decimal

The fixed precision and the decimal number value are between -1038 -1 and 10 38 -1.

Float

Supported by .NET Framework.

Double

The floating point number in the range of -1.79e 308 to 1.79e 308.

Image

Supported by .NET Framework.

Array type is Byte

The variable length stream of binary data ranges from 0 to 231 -1 (or 2, 147, 483, 647) bytes.

Int

Supported by .NET Framework.

Int32

A 32-bit sign integer.

Money

Supported by .NET Framework.

Decimal

A currency value ranges from -263 (ie, -922, 337, 203, 685, 477.5808) to 2 63 -1 (i.e., 922, 337, 203, 685, 477.5807), the accuracy is 10,000 yuan.

Nchar

Supported by .NET Framework.

String

The fixed length stream of Unicode characters ranges from 1 to 4,000 characters.

NText

Supported by .NET Framework.

Numeric String

The variable length flow of Unicode data, the maximum length of 230 - 1 (or 1, 073, 741, 823) characters.

..............

Nvarchar

Supported by .NET Framework.

String

The variable length stream of Unicode characters ranges from 1 to 4,000 characters.

Note If the string is greater than 4,000 characters, implicit conversions will fail. When using a string than 4,000 characters longer, explicitly set the object.

REAL

Supported by .NET Framework.

Single

The floating point numbers in -3.40E 38 to 3.40e 38 are available.

SmallDateTime

Supported by .NET Framework.

Datetime

Date and time data, the value range from January 6 to June 6, 2079 from June 6, 2079, and the accuracy is 1 minute.

Smallint

Supported by .NET Framework.

INT16

A 16-bit sign integer.

Smallmoney

Supported by .NET Framework.

Decimal

A currency value, the range is between -214, 748.3648 to 214, 748.3647, and the accuracy is 10,000 currency units. TEXT

Supported by .NET Framework.

String

The variable length stream of non-Unicode data, the maximum length of 231 -1 (or 2, 147, 483, 647) characters.

Timestamp

Supported by .NET Framework.

Array type is Byte

Automatically generated binary numbers and guarantee that it is unique in the database. TimeSTAMP is often used as a mechanism for tagging from the versions of the tables. The storage size is 8 bytes.

Tinyint

Supported by .NET Framework.

Byte

8-bit unsigned integer.

UniqueIdentifier

Supported by .NET Framework.

GUID

Global unique identifier (or GUID).

Varbinary

Supported by .NET Framework.

Array type is Byte

The variable length stream of binary data is between 1 and 8,000 bytes.

Note If the byte array is greater than 8,000 bytes, implicit conversions will fail. Explicitly set objects when using a built-in array than 8,000 bytes.

VARCHAR

Supported by .NET Framework.

String

The variable length stream of non-Unicode characters ranges from 1 to 8,000 characters.

Variant

Supported by .NET Framework.

Object

Special data types, you can contain values, strings, binary or date data, and SQL Server Value Empty and Null, the two values ​​later are adopted without declaring other types.

转载请注明原文地址:https://www.9cbs.com/read-67316.html

New Post(0)