DB2 class-level translations

The following sections list the class-level translations for Adaptive Server datatypes to DB2 datatypes, DB2 datatypes to Adaptive Server datatypes, and DB2 datatypes to datatypes of other supported non-ASE data servers.

Adaptive Server to DB2 datatypes

Table A-1 lists class-level translations from Adaptive Server datatypes to DB2 datatypes.

Table A-1: Class-level translation from Adaptive Server to DB2 datatypes

Adaptive Server datatype

DB2 datatype

bigint

BIGINT

binary

CHAR FOR BIT DATA

bit

TINYINT

date

DATE (UNIX and Windows only)

datetime

TIMESTAMP

decimal

DECIMAL

int

NUMERIC

money

NUMERIC

numeric

NUMERIC

real

REAL (UNIX and Windows only)

smalldatetime

TIMESTAMP

smallint

NUMERIC

smallmoney

NUMERIC

time

TIME (UNIX and Windows only)

tinyint

NUMERIC

unsigned bigint

DECIMAL (20,0)

unsigned int

BIGINT

unsigned smallint

INTEGER

unsigned tinyint

SMALLINT

unitext

DBCLOB

varbinary

VARCHAR FOR BIT DATA

DB2 to Adaptive Server datatypes

Table A-2 lists class-level translations from DB2 datatypes to Adaptive Server datatypes.

Table A-2: Class-level translation from DB2 to Adaptive Server datatypes

DB2 datatype

Adaptive Server datatype

CHAR FOR BIT DATA

binary

DATE

datetime

DOUBLE (UNIX and Windows only)

float

REAL (UNIX and Windows only)

real

TIME

datetime

TIMESTAMP

datetime

VARCHAR FOR BIT DATA

varbinary

DB2 to Microsoft SQL Server datatypes

Table A-3 lists class-level translations from DB2 datatypes to Microsoft SQL Server datatypes.

Table A-3: Class-level translation from DB2 to Microsoft SQL Server datatypes

DB2 datatype

Microsoft SQL Server datatype

CHAR FOR BIT DATA

binary

DATE

datetime

DOUBLE (UNIX and Windows only)

float

REAL (UNIX and Windows only)

real

TIME

datetime

TIMESTAMP

datetime

VARCHAR FOR BIT DATA

varbinary

DB2 to Oracle datatypes

Table A-4 lists class-level translations from DB2 datatypes to Oracle datatypes.

Table A-4: Class-level translation from DB2 to Oracle datatypes

DB2 datatype

Oracle datatype

CHAR FOR BIT DATA

RAW

DATE

DATE

DOUBLE (UNIX and Windows only)

FLOAT

REAL (UNIX and Windows only)

REAL

TIME

DATE (with time)

TIMESTAMP

DATE (with time)

VARCHAR FOR BIT DATA

RAW