SQL Server DB Type and CLR Type

这段时间学习SQL Server CLR编程,但是SQL CLR编程,里面所使用的数据类型为CLE TYPE,它多少与 Db TYPE有些区别,在网上找到一个列表http://geekswithblogs.net/manjunath.k/archive/2013/09/11/sqldbtype-to-clr-type.aspx,转载于此,方便查阅。

SqlDbType CLR Type
SqlDbType.Binary typeof(byte[])
SqlDbType.Image 
SqlDbType.Timestamp 
SqlDbType.VarBinary
SqlDbType.Char typeof(string)
SqlDbType.NChar
SqlDbType.NText
SqlDbType.NVarChar
SqlDbType.Text
SqlDbType.VarChar
SqlDbType.Xml
SqlDbType.DateTime typeof(DateTime?)
SqlDbType.SmallDateTime
SqlDbType.Date
SqlDbType.Time
SqlDbType.DateTime2
SqlDbType.BigInt typeof(long?)
SqlDbType.Bit typeof(bool?)
SqlDbType.Decimal typeof(decimal?)
SqlDbType.Money
SqlDbType.SmallMoney
SqlDbType.Float typeof(double?)
SqlDbType.Int typeof(int?)
SqlDbType.Real typeof(float?)
SqlDbType.UniqueIdentifier typeof(Guid?)
SqlDbType.SmallInt typeof(short?)
SqlDbType.TinyInt typeof(byte?)
SqlDbType.Variant typeof(object)
SqlDbType.Udt
SqlDbType.Structured typeof(DataTable)
SqlDbType.DateTimeOffset typeof(DateTimeOffset?)

 

下面内容于2015-03-30 15:10分补充

Mapping CLR Parameter Data

https://msdn.microsoft.com/en-us/library/ms131092.aspx

posted @ 2015-03-30 13:25  Insus.NET  阅读(483)  评论(0编辑  收藏  举报