Forum Stats

  • 3,780,920 Users
  • 2,254,456 Discussions
  • 7,879,494 Comments

Discussions

change wrong mysql values like 'ü'

2811958
2811958 Member Posts: 2
edited Apr 14, 2016 11:24AM in MySQL Community Space

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.'

Tagged:

Answers