简体   繁体   中英

do i need to set table to utf with database?

I want to set the character coding of my tables to UTF-8. So what I am planning is set the database to UTF-8 instead of tables.

My question is, if I set UTF-8 to database, default all tables under that database also get to utf-8?

The default collation is exactly that, just a default, so when you create a table that does not have collation info that table will use the default value. In particular, there're two things that setting a database default will not accomplish:

  • Change the encoding of existing tables
  • Force new tables to use such encoding

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM