MySQL
DB2 UDB
Comments
FROM_DAYS(n)
DATE(n 365)
DB2 and MySQL use 
different base year
FROM_UNIXTIME
TIMESTAMP_FORMAT
May deliver slightly 
different result
PERIOD_ADD: 
SELECT 
Adds a number of month
select 
DATE(`2004 02 23')   12 
period_add(9602, 12)
MONTH FROM T1
PERIOD_DIFF
YEAR and MONTH
Requires some date 
arithmetic
WEEKDAY
DAYOFWEEK
DB2 range is 1 (Sunday) to 
7, MySQL ranges 0 
(Monday ) to 6."
SEC_TO_TIME
HOUR, MINUTE, 
Requires some time 
SECOND
arithmetic
TIME_TO_SEC
HOUR, MINUTE, 
Requires some time 
SECOND
arithmetic
TO_DAYS
DAYS
Requires some date 
arithmetic
More functions
There is always a set of items left that do not seem to fit in any of the categories 
defined when the categorization has been decided. Those you find in Table 7 7.
Table 7 7   Other functions
MySQL
DB2 UDB
Comments
BETWEEN in SELECT
CASE
Implement using CASE 
expression and VALUES 
statement
<< and >> (bitwise shifts)
no equivalent
Implement using 
power
function:
MySQL:
SELECT (x>>y)
SELECT(x<
DB2 UDB:
SELECT(x/power(2,y))
SELECT(x*power(2,y)):
 Chapter 7. Application porting 
171






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

san diego web hosting

 

Our partners: PHP: Hypertext Preprocessor Cheap Web Hosting JSP Web Hosting Ontario Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Java Hosting Cheapest Hosting

Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved