The following table illustrates datatype conversion that is performed when a create table or alter table statement is processed using DirectConnect for Oracle with Adaptive Server Enterprise. DirectConnect for Oracle constructs syntax for the Oracle datatypes as shown:
Adaptive Server datatype |
Oracle datatype |
---|---|
bit |
char(1) |
tinyint |
number(3,0) |
smallint |
number(4,0) |
int |
number(10,0) |
smallmoney |
number(10,4) |
money |
number(19,4) |
float |
float |
real |
float |
decimal(p,s) |
number(p,s) |
numeric(p,s) |
number(p,s) |
char(n) |
char(n) |
varchar(n) |
varchar2(n) |
unichar(n) |
nchar(n) |
univarchar(n) |
nvarchar2(n) |
binary(n) |
raw(n) |
varbinary(n) |
raw(n) |
timestamp |
raw(16) |
text |
CLOB |
image |
BLOB |
datetime |
date |
smalldatetime |
date |
date |
date |
time |
timestamp |
When a create existing table command is processed, the datatype for each column specifies the type of conversion to be performed from the Oracle columns to Adaptive Server Enterprise columns during query processing. The following table describes the allowable datatypes that can be used for existing Oracle datatypes.
Adaptive Server datatype |
Oracle datatype |
---|---|
int, smallint, tinyint, float, double, numeric, decimal |
number |
datetime |
date |
date |
date |
time |
timestamp |
datetime |
timestamp |
char(n) |
char(n) |
varchar(n) |
varchar2(n) up to 4000 bytes |
text |
CLOB |
binary(n) or varbinary(n) |
raw(n) up to 4000 bytes |
image |
BLOB |