MySQL
DB2 UDB
Example
not available
VARIANCE
DB2 UDB:
select variance(a), a from
t1 group by a
GROUP BY on alias
use column name for
MySQL:
grouping
select a as ab from t1
group by ab
DB2 UDB:
select a from t1 group by a
GROUP BY on position
use column name for
MySQL:
grouping
select a from t1 group by 1
DB2 UDB:
select a from t1 group by a
HAVING on alias
use column name in
MySQL:
having clause
select a as ab from t1
group by a having ab > 0
DB2 UDB:
select a from t1 group by a
having a > 0
7.1.6 Strings
Unless MySQL is started in ANSI mode using
mysqld ansi
it will behave
differently from DB2 Version 8.1. As Example 7 7 illustrates, MySQL accepts
single as well as double quotes as a string delimiter when started in default
mode.
Example 7 7 MySQL string handling
mysql> select redbook , "redbook" , ""redbook"" , red book ;
+ + + + +
| redbook | "redbook" | ""redbook"" | red book |
+ + + + +
| redbook | "redbook" | ""redbook"" | red book |
+ + + + +
1 row in set (0.00 sec)
mysql> select "redbook", " redbook ", " redbook ", "red""book";
+ + + + +
| redbook | redbook | redbook | red"book |
+ + + + +
Chapter 7. Application porting
161
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