Collation when creating schema?
已回答
I just tried Datagrip for the first time, but ran into something right away. When creating a new schema, I only could fill in the name. How do I choose collation/charset? If not possible, what collation will the schema have?
请先登录再写评论。
@Mathias,
You can set in script, possible variation are suggested by completion:
> If not possible, what collation will the schema have?
For example, if you're working with MySQL refer to documentation https://dev.mysql.com/doc/refman/8.0/en/charset-database.html
>
MySQL chooses the database character set and database collation in the following manner:
If both
CHARACTER SETandcharset_nameCOLLATEare specified, character setcollation_namecharset_nameand collationcollation_nameare used.If
CHARACTER SETis specified withoutcharset_nameCOLLATE, character setcharset_nameand its default collation are used. To see the default collation for each character set, use theSHOW CHARACTER SETstatement or query theINFORMATION_SCHEMACHARACTER_SETStable.If
COLLATEis specified withoutcollation_nameCHARACTER SET, the character set associated withcollation_nameand collationcollation_nameare used.Otherwise (neither
CHARACTER SETnorCOLLATEis specified), the server character set and server collation are used.