Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiDB6.5 设置排序规则为utf8mb4_general_ci之后,如果create table语句中指定了default charset=utf8 但是没有指定排序规则 那么该表的排序规则是啥
After setting the collation to utf8mb4_general_ci in TiDB 6.5, if the create table statement specifies default charset=utf8 but does not specify a collation, what will be the collation of the table? Will it be utf8_bin or utf8mb4_general_ci?
I am not asking about the priority order.
So I changed it, haha. I misread it at first.
If no collation is specified but a character set is specified, the default collation will use the default collation of the specified character set.
The previous statement is correct. It is recommended to specify the character set and collation when creating the database, and not to specify these two clauses when creating the table.
I think it’s utf8_bin, but I’m too lazy to verify it 
Collation is utf8mb4_general_ci.
There is a default character set corresponding to the default collation, check the documentation.
Seeing is believing. You can do an experiment: after creating the table, use the show create table statement to see what the table creation statement looks like. I guess utf8mb4_general_ci is more likely.
Guessed wrong.
The default sorting for utf8 encoding is utf8_bin. If not specified, this is the default.
Will use matching character sets.
The default character set is utf8_bin.
You’re right. I misunderstood the question. I thought default_charset was utf8bm4.
utf8_bin matches the character set.