C#等效于SQL Server数据类型

99封情书 提交于 2020-10-22 12:10:15

问题:

For the following SQL Server datatypes, what would be the corresponding datatype in C#? 对于以下SQL Server数据类型,C#中对应的数据类型是什么?

Exact Numerics 精确数值

bigint
numeric
bit
smallint
decimal
smallmoney
int
tinyint
money

Approximate Numerics 近似数值

float
real

Date and Time 日期和时间

date
datetimeoffset
datetime2
smalldatetime
datetime
time

Character Strings 字符串

char
varchar
text

Unicode Character Strings Unicode字符串

nchar
nvarchar
ntext

Binary Strings 二进制字符串

binary
varbinary
image

Other Data Types 其他数据类型

cursor
timestamp
hierarchyid
uniqueidentifier
sql_variant
xml
table

(source: MSDN ) (来源: MSDN


解决方案:

参考一: https://stackoom.com/question/1mf7/C-等效于SQL-Server数据类型
参考二: https://oldbug.net/q/1mf7/C-Equivalent-of-SQL-Server-DataTypes
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!