This is an old revision of the document!
Technical information on migration from IBM DB2 to MySQL.
Last Update: IBM DB2 10.1 and MySQL 5.6
Converting data types:
DB2 | MySQL | ||
CHAR | Fixed-length character string | CHAR | |
DATE | Date (year, month and day) | DATE | |
INT, INTEGER | 32-bit integer | INT, INTEGER | |
SMALLINT | 16-bit integer | SMALLINT | |
TIMESTAMP | Date and time | DATETIME | |
VARCHAR | Variable-length character string | VARCHAR |
Converting functions:
DB2 | MySQL | |||
1 | CURRENT DATE | CURRENT_DATE | Get current date | CURRENT_DATE |
Converting SQL SELECT statement:
DB2 | MySQL | |
SYSIBM.SYSDUMMY1 table | A single row, single column dummy table | FROM clause removed |
Converting SQL statements:
DB2 | MySQL | |
VALUES expression | Construct a result set | SELECT expression |