1 record(s) selected.
db2 =>  select concat( abc , coalesce(col1,  )) as nullstring from t2
NULLSTRING
     
abc
  1 record(s) selected.
7.1.9  Record deletion
As some other competitive relational database management systems, MySQL 
introduced in Version V4.0 the TRUNCATE statement. TRUNCATE is used to 
delete all rows from a table when there is no need to recover the deleted records. 
Therefore, there is no ROLLBACK after a TRUNCATE is possible. Example 7 15 
shows how TRUNCATE is used to remove all rows, and does not allow a rollback 
of the deleted rows.
Example 7 15   Using MySQL TRUNCATE to delete all records in a file
mysql> select * from t1;
+      +
| col1 |
+      +
|    5 |
|   10 |
+      +
2 rows in set (0.02 sec)
mysql> truncate table t1;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from t1;
Empty set (0.00 sec)
mysql> rollback
     > ;
ERROR 1196: Warning:  Some non transactional changed tables couldn t be rolled 
back
mysql> select * from t1;
Empty set (0.00 sec)
The TRUNCATE option is primarily used to quickly delete all records from a table 
when no recovery of the deleted rows is required. To achieve a similar behavior 
 Chapter 7. Application porting 
167






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