Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Server Classes for Remote Data Access » ODBC-based server classes » Server class mssodbc

Server class mssodbc Next Page

Data type conversions: Microsoft SQL Server

When you issue a CREATE TABLE statement, SQL Anywhere automatically converts the data types to the corresponding Microsoft SQL Server data types. The following table describes the SQL Anywhere to Microsoft SQL Server data type conversions.

SQL Anywhere data typeMicrosoft SQL Server default data type
bit bit
tinyint tinyint
smallint smallint
int int
bigint numeric(20,0)
decimal [defaults p=30, s=6] decimal(prec, scale)
numeric [defaults p=30 s=6] numeric(prec, scale)
float if (prec) float(prec) else float
real real
smallmoney smallmoney
money money
date datetime
time datetime
timestamp datetime
smalldatetime datetime
datetime datetime
char(n) if (length > 255) text else varchar(length)
character(n) char(n)
varchar(n) if (length > 255) text else varchar(length)
long varchar text
binary(n) if (length > 255) image else binary(length)
long binary image
double float

The Microsoft SQL Server uniqueidentifier column is mapped to a SQL Anywhere uniqueidentifierstr column. The resulting string can be converted to a binary UUID value using the STRTOUUID function. See STRTOUUID function [String].