Recommended RDS Datatype to SQL Datatype Mappings

Use the RDS datatype to SQL datatype mappings table to map the available RDS datatypes to the indicated database column types for optimal performance.

Table 1. RDS datatype to SQL datatype mappings

RDS datatype

ASE datatype

Sybase IQ datatype

uint8

tinyint

tinyint

uint16

unsigned smallint

unsigned int (IQ has no unsigned smallint)

uint32

unsigned int

unsigned int

uint64

unsigned bigint

unsigned bigint

sint8

smallint (ASE has no signed 8-bit integer)

smallint (IQ has no signed 8-bit integer)

sint16

smallint

smallint

sint32

int

int

sint64

bigint

bigint

decimal( p, s )

numeric( p, s ) or decimal( p, s )

numeric( p, s ) or decimal( p, s )

datetime

datetime or smalldatetime

timestamp

date

date or smalldate

date

time

time

time

string

char(n) or varchar(n) n <255*

char(n) or varchar(n) n <255*

Note:

  • If you know that data for a column is always going to be less than a specific length, then setting n to be as small as possible yields better performance.

  • To gain maximum performance from the Publisher API, the pub_setDecimalFieldFromMantissa API should be used instead of the pub_setDecimal API to set decimal fields, if you are able to obtain the desired value in a format other than a double.

  • The ASE and IQ time and date/time data types store time values to different precisions. ASE stores partial seconds to 1/300th of a second, while IQ stores partial seconds to 6 decimal places.


Created March 26, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com