change table column charset in mysql

by Ramya 2010-12-03 10:01:19

change table column charset in mysql:


Whenever you create a table in mysql database, it takes default charset "latin1_swedish_ci". Hence to change table column charset in mysql use Alter command as,

ALTER TABLE tablename CHANGE `fieldname` `fieldname` datatype CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL

Tagged in:

1012
like
0
dislike
0
mail
flag

You must LOGIN to add comments