Unsupported Screen Size: The viewport size is too small for the theme to render properly.

varchar latin1 -> varchar latin2

forums forums SQLyog Using SQLyog varchar latin1 -> varchar latin2

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #8087
      bass
      Member

      Hello,

      I have a DB with over 140 tables with some VARCHAR fields.

      Now I have to change every VARCHAR field of every table

      to “character set latin2”. Whats the simplest and fastest

      way to do this? Making a query for every table like

      Alter table ..

      CHANGE field … character set

      tooks to long time!

      Does anybody know a faster way?

      Regards

      Bass

    • #14657
      Shadow
      Member

      What if you set the charset of the entire db to latin2? Here is an extract from MySql manual:

      Quote:
      By default, MySQL uses the ISO-8859-1 (Latin1) character set. To change the default set, use the –with-charset option:

      shell> ./configure –with-charset=CHARSET

      CHARSET may be one of big5, cp1251, cp1257, czech, danish, dec8, dos, euc_kr, gb2312, gbk, german1, hebrew, hp8, hungarian, koi8_ru, koi8_ukr, latin1, latin2, sjis, swe7, tis620, ujis, usa7, or win1251ukr. See section 4.6.1 The Character Set Used for Data and Sorting. If you want to convert characters between the server and the client, you should take a look at the SET CHARACTER SET command. See section 5.5.6 SET Syntax. Warning: If you change character sets after having created any tables, you will have to run myisamchk -r -q –set-character-set=charset on every table. Your indexes may be sorted incorrectly otherwise. (This can happen if you install MySQL, create some tables, then reconfigure MySQL to use a different character set and reinstall it.) With the option –with-extra-charsets=LIST you can define which additional character sets should be compiled into the server. Here LIST is either a list of character sets separated with spaces, complex to include all characters that can't be dynamically loaded, or all to include all character sets into the binaries.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.