您的位置:首页 > 数据库

Sql Server 数据类型与 C# 数据类型对照

2016-05-06 15:12 423 查看

Sql Server 数据类型与 C# 数据类型对照

已验证类型(Sql Server 2012 & Visual Studio 2013)

Sql ServerC#简写
bigintSystem.Int64long
tinyintSystem.Bytebyte
binary(50)System.Byte[]byte[]
imageSystem.Byte[]byte[]
varbinary(50)System.Byte[]byte[]
timestampSystem.Byte[]byte[]
bitSystem.Booleanbool
char(10)System.Stringstring
nchar(10)System.Stringstring
ntextSystem.Stringstring
nvarchar(50)System.Stringstring
varchar(50)System.Stringstring
textSystem.Stringstring
dateSystem.DateTimeSystem.DateTime
datetimeSystem.DateTimeSystem.DateTime
datetime2(7)System.DateTimeSystem.DateTime
smalldatetimeSystem.DateTimeSystem.DateTime
datetimeoffset(7)System.DateTimeOffsetSystem.DateTimeOffset
time(7)System.TimeSpanSystem.TimeSpan
decimal(18,0)System.Decimaldecimal
moneySystem.Decimaldecimal
numeric(18,0)System.Decimaldecimal
smallmoneySystem.Decimaldecimal
floatSystem.Doubledouble
intSystem.Int32int
realSystem.Singlefloat
smallintSystem.Int16short

未验证类型

Sql ServerC#简写
uniqueidentifierSystem.GuidSystem.Guid
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: