Re: Help explain character_set_database and collation_database
Posted by: Gary Yang
Date: August 14, 2019 07:48PM

I still think they are information only, which don't affect anything. What are really in effect are the default character set and default collation of the database, not the values the variables.

Example:

use fiscal;
show variables like 'collation_database%'; -- ==> latin1_general_cs
set collation_database=latin1_general_ci;
show variables like 'collation_database%'; -- ==> latin1_general_ci
create table t1 (co11 char (1));

Table t1 is effectively created as:

CREATE TABLE `t1` (
`co11` char(1) COLLATE latin1_general_cs DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs;

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.