Collation when creating schema?

Answered

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?

1 comment
Comment actions Permalink

@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 SET charset_name and COLLATE collation_name are specified, character set charset_name and collation collation_name are used.

  • If CHARACTER SET charset_name is specified without COLLATE, character set charset_name and its default collation are used. To see the default collation for each character set, use the SHOW CHARACTER SET statement or query the INFORMATION_SCHEMA CHARACTER_SETS table.

  • If COLLATE collation_name is specified without CHARACTER SET, the character set associated with collation_name and collation collation_name are used.

  • Otherwise (neither CHARACTER SET nor COLLATE is specified), the server character set and server collation are used.

 

0

Please sign in to leave a comment.