加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

CodeSmith,SqlServer,C#中的类型对照

发布时间:2020-12-12 15:59:12 所属栏目:MsSql教程 来源:网络整理
导读:CodeSmith,SqlServer,C#中的类型对照 SqlServer?????????CodeSmith?????????????????????????????????? cs bigint??????????????????Int64??????????????????????????????????????? Int64 binary?????????????????Binary?????????????????????????????? Syst
CodeSmith,SqlServer,C#中的类型对照

SqlServer?????????CodeSmith?????????????????????????????????? cs
bigint??????????????????Int64??????????????????????????????????????? Int64
binary?????????????????Binary?????????????????????????????? System.Byte[]
bit????????????????????? Boolean??????????????????????????????????? bool
char????????????????? AnsiStringFixedLength????????????? string
datetime?????????????DateTime?????????????????????????????????? string
decimal????????????? Decimal??????????????????????????????????? Decimal
float???????????????????Double??????????????????????????????????????? Double
image?????????????????Binary??????????????????????????????? System.Byte[]
int????????????????????? Int32????????????????????????????????????????????int
money???????????????Currency?????????????????????????????????? Single
nchar???????????????? StringFixedLength????????????????????????? string
ntext????????????????? String????????????????????????????????????????????string
numeric?????????????Decimal????????????????????????????????????Decimal
nvarchar????????????String????????????????????????????????????????????string
real???????????????????Single??????????????????????????????????????????? Single
smalldatetime???? DateTime?????????????????????????????????????? string
smallint???????????????Int16????????????????????????????????????????????Int16
smallmoney???????? Currency?????????????????????????????????? Single
sql_variant????????? Object??????????????????????????????????????? Object
text?????????????????????AnsiString?????????????????????????????????? string
timestamp???????????Binary??????????????????????????????????? System.Byte[]
tinyint????????????????? Byte??????????????????????????????????????????? Byte
uniqueidentifier???? Guid?????????????????????????????????????? System.Guid
varbinary???????????? Binary??????????????????????????????????? System.Byte[]
varchar????????????????AnsiString?????????????????????????????????? string

其中有些类型为了处理简便,做了一些调整。如:DataTime类型转成string型处理

?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读