数据库中字段类型对应的C#中的数据类型.pdf
文本预览下载声明
数据库中字段类型对应的C#中的数据类型
数据库c#存储stringimagefloat
数据库中字段类型对应C#中的数据类型:
数据库 C#程序
int int3
text string
bigint int64
binary System.Byte[]
bit Boolean
char string
datetime System.DateTime
decimal System.Decimal
float System.Double
image System.Byte[]
money System.Decimal
nchar String
ntext String
numeric System.Decimal
nvarchar String
real System.Single
smalldatetime System.DateTime
smallint Int16
smallmoney System.Decimal
timestamp System.DateTime
tinyint System.Byte
uniqueidentifier System.Guid
varbinary System.Byte[]
varchar String
Variant Object
数据库中相关字段类型的详解:
数据类型 类型 描 述
bit 数据类型是整型,其值只能是0、1或空值。
bit 整型 这种数据类型用于存储只有两种可能值的数据,如Yes 或 No、True 或 False
、On 或Off
31 31
int 数据类型可以存储从- (-2147483648)到 (2147483647)之间的整数。
int 整型 存储到数据库的几乎所有数值型的数据都可以用这种数据类型。
这种数据类型在数据库里占用4个字节
15 15
smallint 数据类型可以存储从- (-32768)到 (32767)之间的整数。
smallint 整型 这种数据类型对存储一些常限定在特定
显示全部