Creating mysql table with explicit default character set, what if I don't?

前端 未结 2 567
轮回少年
轮回少年 2021-02-02 10:43

In mysql 5.x Whats the difference if I do something like this:

CREATE TABLE aTable (
    id                       BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
            


        
2条回答
  •  温柔的废话
    2021-02-02 11:11

    There are 4 levels of default settings in MySQL: server, database, table, and column. Using lower level defaults, you can override higher lever defaults.

    If you alter a table that has default charset set to something other than what the database has set, the table default will override the db default.

提交回复
热议问题