A server with server class db2odbc is IBM DB2.
CREATE EXISTING TABLE ibmcol AT 'mydb2..sysibm.syscolumns'; |
When you issue a CREATE TABLE statement, SQL Anywhere automatically converts the data types to the corresponding DB2 data types. The following table describes the SQL Anywhere to DB2 data type conversions.
SQL Anywhere data type | DB2 default data type |
---|---|
BIT | smallint |
TINYINT | smallint |
SMALLINT | smallint |
INT | int |
INTEGER | int |
BIGINT | decimal(20,0) |
CHAR(1-254) | varchar(n) |
CHAR(255-4000) | varchar(n) |
CHAR(4001-32767) | long varchar |
CHARACTER(1-254) | varchar(n) |
CHARACTER(255-4000) | varchar(n) |
CHARACTER(4001-32767) | long varchar |
VARCHAR(1-4000) | varchar(n) |
VARCHAR(4001-32767) | long varchar |
CHARACTER VARYING(1-4000) | varchar(n) |
CHARACTER VARYING(4001-32767) | long varchar |
LONG VARCHAR | long varchar |
TEXT | long varchar |
BINARY(1-4000) | varchar for bit data |
BINARY(4001-32767) | long varchar for bit data |
LONG BINARY | long varchar for bit data |
IMAGE | long varchar for bit data |
DECIMAL [defaults p=30, s=6] | decimal(30,6) |
NUMERIC [defaults p=30 s=6] | decimal(30,6) |
DECIMAL(128, 128) | NOT SUPPORTED |
NUMERIC(128, 128) | NOT SUPPORTED |
REAL | real |
FLOAT | float |
DOUBLE | float |
SMALLMONEY | decimal(10,4) |
MONEY | decimal(19,4) |
DATE | date |
TIME | time |
SMALLDATETIME | timestamp |
DATETIME | timestamp |
TIMESTAMP | timestamp |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |