|
SQL ServerType |
|
C #Type |
Exact number |
Bigint |
Integer Data from-2 ^ 63 (-9223372036854775808) to 2 ^ 63-1 (9223372036854775807) (All numbers ). The storage size is 8 bytes. |
Int64 |
Int |
Integer Data from-2 ^ 31 (-2,147,483,648) to 2 ^ 31-1 (2,147,483,647) (All numbers ). The storage size is 4 bytes.IntThe SQL-92Integer. |
Int32 |
Smallint |
Integer Data from-2 ^ 15 (-32,768) to 2 ^ 15-1 (32,767. The storage size is 2 bytes. |
Int16 |
Tinyint |
Integer Data from 0 to 255. The storage size is 1 byte. |
System. byte |
Bit |
Integer Data of 1 or 0. |
Boolean |
Decimal |
Number of fixed precision and decimal places from-10 ^ 38 + 1 to 10 ^ 38-1. |
System. Decimal |
Numeric |
Functions are equivalentDecimal. |
System. Decimal |
Money |
The value of the currency data is between-2 ^ 63 (-922,337,203,685,477.5808) and 2 ^ 63-1 (+ 922,337,203,685,477.5807), accurate to 10 thousandth of the currency unit. |
System. Decimal |
Smallmoney |
The value of the currency data is between-214,748.3648 and + 214,748.3647, precise to the tenth of the monetary unit. |
System. Decimal |
Approximate Number |
Float |
Floating Point precision numbers from-1.79e + 308 to 1.79e + 308. |
System. Double |
Real |
A floating point number ranging from-3.40e + 38 to 3.40e + 38. |
System. Single |
|
Datetime |
From the date and time of January 1, 3% to 3.33 seconds (or milliseconds ). |
System. datetime |
Smalldatetime |
The date and time data from January 1, January 1-20, 1900 to January 1, June 6 are accurate to minutes. |
System. datetime |
String |
Char |
A fixed length of non-Unicode characters. The maximum length is 8,000 characters. |
String |
Varchar |
Variable-length non-Unicode data, which can contain a maximum of 8,000 characters. |
String |
Text |
Variable-length non-Unicode data. The maximum length is 2 ^ 31-1 (2,147,483,647) characters. |
String |
Unicode string |
Nchar |
Unicode data of a fixed length. The maximum length is 4,000 characters. |
String |
Nvarchar |
A variable-length Unicode data with a maximum length of 4,000 characters.SysnameIs a user-defined data type provided by the system, which is functionally equivalentNvarchar (128)Used to reference the database object name. |
String |
Ntext |
Unicode data with a variable length. The maximum length is 2 ^ 30-1 (1,073,741,823) characters. |
String |
Binary string |
Binary |
A fixed-length binary data with a maximum length of 8,000 bytes. |
System. byte [] |
Varbinary |
A variable-length binary data with a maximum length of 8,000 bytes. |
System. byte [] |
Image |
A variable-length binary data with a maximum length of 2 ^ 31-1 (2,147,483,647) bytes. |
System. byte [] |
Other data types |
Timestamp |
The unique number in the database range, which is also updated each time the row is updated. |
System. datetime |
Uniqueidentifier |
Guid ). |
System. guid |
Variant |
|
Object |