I'm currently again working on a program from when I was, umm... less capable. It has a number of problems:
- The database collation is
latin1_swedish_ci
. I would like to convert it to utf8. How would I do this? - The database has some fields that are boolean values stored as 0 or 1. However, the fields are
varchar
s instead ofbool
s. How c开发者_运维知识库an I convert these?
ad 2) you can export your table using sqldump or "SELECT * INTO OUTFILE xxx from MYTAB;", recreate the table and reimport, optionally after manipulating the exported data (converting 1/0's to true/false etc.)
ad 2) you can create a new bool field and UPDATE tab SET NewBool=True where OldVarChar="1"; etc.
精彩评论