Skip to Main Content

MySQL Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

change wrong mysql values like 'ü'

2811958Apr 14 2016 — edited Apr 14 2016

How can be find out and changed all wrong values like 'ü' on all tables (t0,...tx) in mysql database x_db using SQL script?

x_db using charset UTF8

all tables using charset UTF8

f. exp:

use x_db

show tables;

+------------------+

| Tables_in_x_euro |

+------------------+

| t0               |

| t1               |

...

| tx               |

+------------------+

mysql> select * from t1;

+-------+--------------------------------------+---------------------+

| id    | c1                                   | c2                  |

+-------+--------------------------------------+---------------------+

| 10002 | Müller                              | 2016-04-12 17:05:10 |

| 10003 | Müller                               | 2016-04-12 17:07:01 |

mysql> show create table t1\G

*************************** 1. row ***************************

       Table: t1

Create Table: CREATE TABLE `t1` (

  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `c1` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL,

  `c2` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

  PRIMARY KEY (`id`)

) ENGINE=InnoDB AUTO_INCREMENT=10009 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Testing UTF8.'

Comments
Post Details
Added on Apr 14 2016
2 comments
564 views