c#数据类型 与sql的对应关系 以及 取值范围
2015-05-12 17:39
477 查看
Short Name | .NET Class | Type | Width | Range (bits) | SQL Datatype (Closest Match) | Constraint to use (if needed in table definition) |
---|---|---|---|---|---|---|
byte | Byte | Unsigned integer | 8 | 0 to 255 | tinyint | |
sbyte | SByte | Signed integer | 8 | -128 to 127 | smallint | [ColName] Between -128 AND 127 |
int | Int32 | Signed integer | 32 | -2,147,483,648 to 2,147,483,647 | int | |
uint | UInt32 | Unsigned integer | 32 | 0 to 4294967295 | bigint | [ColName] Between 0 AND 4294967295 |
short | Int16 | Signed integer | 16 | -32,768 to 32,767 | smallint | |
ushort | UInt16 | Unsigned integer | 16 | 0 to 65535 | int | [ColName] Between 0 AND 65535 |
long | Int64 | Signed integer | 64 | -922337203685477508 to 922337203685477507 | bigint | |
ulong | UInt64 | Unsigned integer | 64 | 0 to 18446744073709551615 | decimal(20,0) | [ColName] Between 0 AND 18446744073709551615 |
float | Single | Single-precision floating point type | 32 | -3.402823e38 to 3.402823e38 | real | |
double | Double | Double-precision floating point type | 64 | -1.79769313486232e308 to 1.79769313486232e308 | float | |
bool | Boolean | Logical Boolean type | 8 | True or false | bit | |
decimal | Decimal | Precise fractional or integral type that can represent decimal numbers with 29 significant digits | 128 | ±1.0 × 10e-28 to ±7.9 × 10e28 | decimal (can go 38 significant in SQL need to limit to 29 for here.) |
相关文章推荐
- java的数据类型以及对应得取值范围
- SQL的数据类型与Java数据类型的对应关系
- java.sql.Types,数据库字段类型,java数据类型的对应关系
- Java中各数据类型占多少位以及取值范围
- java.sql.Types,数据库字段类型,java数据类型的对应关系
- C#与sql,数据类型对应关系
- JAVA数据类型与DB2、Oracle、Sybase以及SQL Server对应关系
- java.sql.Types,数据库字段类型,java数据类型的对应关系
- Sql2005数据类型与Framework类型的对应关系
- Java数据类型及对应取值范围
- java.sql.Types,数据库字段类型,java数据类型的对应关系
- Sql2005数据类型与Framework类型的对应关系
- SqlServer数据类型、C#SqlDbType对应关系及转换
- java中的8种基本数据类型占的位数以及取值范围
- SQL的数据类型与Java数据类型的对应关系(转)
- Java数据类型及对应取值范围【速查】
- SQL与C++的数据类型对应关系(网上资料搜集整理)
- java.sql.Types,数据库字段类型,java数据类型的对应关系
- Java数据类型及对应取值范围
- SQL中数据类型和Ole数据类型中的对应关系