G
G
Grigory Vasilkov2017-05-02 15:15:12
MySQL
Grigory Vasilkov, 2017-05-02 15:15:12

Is it necessary to set COLLATE additionally for each field in mysql?

I noticed that in Wordpress, in addition to the fact that it costs
DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci, COLLATE=utf8mb4_unicode_ci is
also set for each text field.
Does this mean that if I add this encoding for new tables, I must also specify COLLATE for each field, or is it enough to specify DEFAULT COLLATE?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2017-05-02
@Rsa97

Base COLLATE is inherited from the server settings, tables - from the base, columns - from the table, so it makes sense to set explicitly only when changing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question