Microsoft SQL Server Data Types Mapping

XPO creates these column types when updating the Microsoft SQL Server database schema and expects them in existing databases.

.NET Type Database Column Type
Boolean bit
Byte tinyint
SByte numeric(3,0)
Char nchar(1)
Decimal money
Double double precision
Single float
Int16 smallint
UInt16 numeric(5,0)
Int32 int
UInt32 numeric(10,0)
Int64 bigint
UInt64 numeric(20,0)
Guid uniqueidentifier
String nvarchar
DateTime datetime
TimeSpan double precision
Byte[] image, in versions prior to 2005; otherwise - varbinary
Unlimited size string ntext, in versions prior to 2005; otherwise - nvarchar
See Also