the example, but also for mixed strings such as 
6x.
 For further information on the 
conversion of strings and numbers, you may want to consult the 
MySQL 
Reference Manual. 
Example 7 9   MySQL performs implicit data type casting
mysql> create table t1 (c1 int);
Query OK, 0 rows affected (0.08 sec)
mysql> insert into t1 values(5);
Query OK, 1 row affected (0.02 sec)
mysql> select * from t1 where c1= 5 ;
+      +
| c1   |
+      +
|    5 |
+      +
1 row in set (0.00 sec)
An implicit casting of incompatible data types is not support by DB2 UDB. An 
explicit casting of the character value to an integer value is required as illustrated 
in Example 7 10.
Example 7 10   DB2 UDB requires explicit casting
db2 => create table t1 (c1 int)
DB20000I  The SQL command completed successfully.
db2 => insert into t1 values(5)
DB20000I  The SQL command completed successfully.
db2 => commit
DB20000I  The SQL command completed successfully.
db2 => select * from t1 where c1 =  5 
SQL0401N  The data types of the operands for the operation "=" are not
compatible.  SQLSTATE=42818
db2 => select * from t1 where c1 = cast ( 5  as int)
C1
           
          5
  1 record(s) selected.
Example 7 11 illustrates how MySQL implicitly casts numeric values and DATA, 
TIME, or TIMESTAMP values to strings when concatenated.
164 
MySQL to DB2 UDB Conversion Guide






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