0

Here is quetions about adding comment to column for MySQL. Can this comment be utf-8? Also what encoding MySQL uses for these columns by default?

Community
  • 1
  • 1
Cherry
  • 31,309
  • 66
  • 224
  • 364

1 Answers1

1

Default character set and collation is set when the database is created

CREATE DATABASE mydb
  DEFAULT CHARACTER SET utf8
  DEFAULT COLLATE utf8_general_ci;

You can modify character set on a specific column like this

ALTER TABLE t MODIFY col1 CHAR(50) CHARACTER SET utf8;
aggaton
  • 3,066
  • 2
  • 25
  • 36