2.3.1.5.1 ColumnType

The set of ColumnType values that are supported by the xsi:type attribute value of the COLUMN element identifies the database data type of an instance of an element.

The following table describes the mapping between the data type names that are specified in the xsi:type attribute of the COLUMN element and the database data types.<7>

COLUMN data type

Database data type

SQLBIGINT

BigInt

SQLBINARY

Binary/TimeStamp

SQLBIT

Bit

SQLCHAR

Char

SQLDATE

Date

SQLDATETIME

DateTime

SQLDATETIME2

DateTime2

SQLDATETIMEOFFSET

DateTimeOffset

SQLDATETIM4,

SmallDateTime

SQLDECIMAL

Decimal

SQLFLT4

Real

SQLFLT8

Float

SQLIMAGE

Image

SQLINT

Int

SQLMONEY

Money

SQLMONEY4

SmallMoney

SQLNCHAR

NChar

SQLNTEXT

NText

SQLNUMERIC

Numeric

SQLNVARCHAR

NVarChar/XML

SQLSMALLINT

SmallInt

SQLTEXT

Text

SQLTIME

Time

SQLTINYINT

TinyInt

SQLUNIQUEID

UniqueIdentifier

SQLVARYBIN

VarBinary

SQLVARYCHAR

VarChar

SQLUDT

CLRUDT

The COLUMN element supports native SQL data types as follows.

Type category

COLUMN data types

Optional XML attribute for data type

Fixed<8>

  • SQLBIT

  • SQLTINYINT

  • SQLSMALLINT

  • SQLINT

  • SQLBIGINT

  • SQLFLT4

  • SQLFLT8

  • SQLDATE

  • SQLDATETIME

  • SQLDATETIM4

  • SQLMONEY

  • SQLMONEY4

  • SQLUNIQUEID

NULLABLE

Variable Scale

  • SQLDATETIME2

  • SQLDATETIMEOFFSET

  • SQLTIME

NULLABLE, SCALE

Variable Number

  • SQLDECIMAL

  • SQLNUMERIC

NULLABLE, PRECISION, SCALE

LOB

  • SQLIMAGE

  • SQLTEXT

  • SQLNTEXT

  • SQLUDT

NULLABLE

Binary string

  • SQLBINARY

  • SQLVARYBIN

NULLABLE, LENGTH

Character string

  • SQLCHAR

  • SQLVARYCHAR

  • SQLNCHAR

  • SQLNVARCHAR

NULLABLE, LENGTH