What is the C# Equivalent of SQL Server DataTypes?


The following table displays the C# equivalent of SQL Server datatypes −

SQL Server data typeEquivalent C# data type
varbinaryByte[]
binaryByte[]
imageNone
varcharNone
charNone
nvarcharString, Char[]
ncharString, Char[]
textNone
ntextNone
rowversionByte[]
bitBoolean
tinyintByte
smallintInt16
intInt32
bigintInt64
smallmoneyDecimal
moneyDecimal
numericDecimal
decimalDecimal
realSingle
floatDouble
smalldatetimeDateTime
datetimeDateTime
tableNone
cursorNone
timestampNone
xmlNone

Updated on: 20-Jun-2020

13K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements