Sql类型与.Net(C#)类型对应关系表(转)
SQL Server |
C# |
NullValue |
|
数据类型 |
数据类型 |
空值代替值 | |
bigint |
Int64 |
Int64.MinValue | |
binary |
Byte[] |
null | |
bit |
bool |
-1 | |
char |
string |
null | |
datetime |
DateTime |
1753-01-01 0:00:00 | |
decimal |
Decimal |
Decimal.MinValue | |
float |
Double |
Double.MinValue | |
image |
Byte[] |
null | |
int |
int |
-2147483648 | |
money |
Single |
Single.MinValue | |
nchar |
string |
null | |
ntext |
string |
null | |
numeric |
Decimal |
Decimal.MinValue | |
nvarchar |
string |
null | |
real |
Single |
Single.MinValue | |
smalldatetime |
DateTime |
1900-01-01 0:00:00 | |
smallint |
Int16 |
Int16.MinValue | |
smallmoney |
Single |
Single.MinValue | |
sql_variant |
Object |
null | |
text |
string |
null | |
timestamp |
Byte[] |
null | |
tinyint |
Byte |
Byte.MinValue | |
uniqueidentifier |
Guid |
Guid.Empty | |
varbinary |
Byte[] |
null | |
varchar |
string |
|
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc
C/S框架网