SQL adaptation guide For IBM DB2 UDB 8.x, 9x / Data manipulation |
Both Informix® and DB2® provide numerous built-in SQL functions. Most Informix SQL functions have the same name and purpose in DB2 ( DAY(), MONTH(), YEAR(), UPPER(), LOWER(), LENGTH() ).
Informix | IBM DB2 |
---|---|
today | current date |
current hour to second | current time |
current year to fraction(5) | current timestamp |
trim( [leading | trailing | both "char" FROM] "string") | ltrim() and rtrim() |
pow(x,y) | power(x,y) |
You must review the SQL statements using TODAY / CURRENT / EXTEND expressions.
You can create user defined functions ( UFs ) in the DB2 database.