Data type conversions

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

Sybase IQ data type

Microsoft SQL Server default data type

bit

bit

tinyint

tinyint

smallint

smallint

int, integer

int

bigint

numeric(20,0)

decimal [defaults precision=30, scale=6]

decimal(prec, scale)

numeric [defaults precision=30, scale=6]

numeric(prec, scale)

float

if (prec) float(prec) else float

real

real

smallmoney

smallmoney

money

money

date

datetime

time

datetime

smalldatetime

datetime

datetime

datetime

timestamp

datetime

char(n)

if (length>255) text else varchar(length)

character(n)

char(n)

varchar(n)

if (length>255) text else varchar(length)

binary(n)

if (length>255) image else binary(length)

long binary

image

double

float

uniqueidentifierstr

uniqueidentifier