Table 7 1 Differences in DB2 and MySQL grouping, having and ordering
MySQL
DB2 UDB
Example
BIT_AND
Not available. Example
MySQL:
provided
select bit_and(a),a from t1
group by a
DB2 UDB:
Refer to UDF example
BITAND in Appendix A.1,
Sample code for
BIT_AND on page 336
BIT_OR
Not available
MySQL:
select bit_or(a),a from t1
group by a
DB 2UDB:
Compare to UDF BitAnd in
Appendix A.1, Sample
code for BIT_AND on
page 336
COUNT(DISTINCT
DB2 allows only one
MySQL:
expr,expr,...)
expression:
select count(distinct a,b),a
COUNT(DISTINCT expr).
from t1 group by a
Use CONCAT for
character data type or
DB2 UDB:
CHAR and CONCAT on
select count(distinct
numeric data types
concat(a,b)), a from t1
group by a
STD
STDDEV
MySQL:
select std(a),a from t1
group by a
DB2 UDB:
select stddev(a), a from t1
group by a
STDDEV
STDDEV
MySQL:
select stddev(a),a from t1
group by a
DB2 UDB:
select stddev(a),a from t1
group by a
160
MySQL to DB2 UDB Conversion Guide
footer
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