SQL adaptation guide for IBM DB2 UDB 10.x / Data dictionary |
Informix® and IBM® DB2® use different implementations of the ALTER TABLE instruction. For example:
Informix:
ALTER TABLE customer ADD(col1 INTEGER), ADD(col2 CHAR(20))
IBM DB2:
ALTER TABLE customer ADD col1 INTEGER ADD col2 CHAR(20)
Informix:
ALTER TABLE customer MODIFY ( col1 INTEGER )
IBM DB2:
ALTER TABLE customer ALTER COLUMN col1 SET data type VARCHAR(200)
No automatic conversion is done by the database interface. Read the SQL documentation and review the SQL scripts or the BDL programs in order to use the database server specific syntax for ALTER TABLE.