Forum Moderators: open

Message Too Old, No Replies

Change character set

Alter multiple tables and fields

         

mcibor

8:36 pm on Dec 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Mysql:

Hi all!
I need to change in all my tables character set from latin1 to latin2 and collation from latin1_swedish_ci to latin2_general_ci

With one table, one field it's simple:
ALTER TABLE `astral` CHANGE `type` `type` CHAR( 2 ) CHARACTER SET latin2 COLLATE latin2_general_ci NOT NULL

but how to perform it on all fields, all tables?

Regards
Michal

mcibor

8:45 pm on Dec 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think I found a solution: there is no way to do that in pure mysql.

only with help of php:
[dev.mysql.com...]
posted by shimon doodkin

Thanks anyway
Michal