Technical information on migration from MySQL to IBM DB2.
Last Update: MySQL 5.6 and IBM DB2 10.1
Converting data types:
| MySQL | IBM DB2 | |
| CHAR | Fixed-length character string | CHAR |
| DATETIME | Date and time data | TIMESTAMP |
| DOUBLE | 8-byte floating-point number | DOUBLE |
| FLOAT | 4-byte floating-point number | REAL |
| INT, INTEGER | 32-bit integer | INT, INTEGER |
| SMALLINT | 16-bit integer | SMALLINT |
| VARCHAR | Variable-length character string | VARCHAR |
Converting functions:
| MySQL | DB2 | ||
| 1 | DATE_FORMAT(date, format) | Convert date to string | VARCHAR_FORMAT(date, format) |
Converting SQL SELECT statement:
| MySQL | DB2 | |
| 1 | SELECT without FROM clause | FROM sysibm.sysdummy1 is added |