Sunday, March 20, 2011

Mapping Data Between SQL Type and XSD Type

SQL typeXSD typeType restrictions
BigIntxsd:long
Binaryxsd:base64Binary
Bitxsd:boolean
Charxsd:string
DateTimexsd:dateTime

Decimalxsd:decimal
Float(53)xsd:double
GUID (same as UniqueIndentifier)xsd:string
Imagexsd:base64Binary
Intxsd:int
Moneyxsd:decimal


NCharxsd:string
NTextxsd:string
Numericxsd:decimal
NVarCharxsd:string
Realxsd:float
SmallIntxsd:short
SmallDateTimexsd:dateTime
SmallMoneyxsd:decimal

Sql_Variantxsd:anyType
Textxsd:string
TimeStampxsd:base64Binary (in SQL Server 2005 or later compatibility mode); xsd:long (in SQL Server 2000 compatibility mode)8
TinyIntxsd:unsignedByte
UDT (CLR style)xsd:base64Binary (in SQL Server 2005)Additional information about the actual type is provided within facets.
UDT (old style)Mapped to original base type
VarBinaryxsd:base64Binary
VarCharxsd:string
XMLxsd:any
XML (typed)xsd:anyXML schema that the XML is typed to is returned.

No comments:

Post a Comment