Slide 42
Slide 42 text
utf8(mb3) の設定された Schema, Column 一覧を取得
42
mysql > SELECT
-> SCHEMA_NAME,
-> CONCAT('schema''s default character set: ', DEFAULT_CHARACTER_SET_NAME)
-> FROM
-> information_schema.SCHEMATA
-> WHERE
-> SCHEMA_NAME NOT IN ('information_schema', 'mysql', 'performance_schema', 'sys', 'tmp') AND
-> DEFAULT_CHARACTER_SET_NAME in ('utf8', 'utf8mb3')
-> UNION
-> SELECT
-> CONCAT(TABLE_SCHEMA, ".", TABLE_NAME, ".", COLUMN_NAME),
-> CONCAT('column''s default character set: ', CHARACTER_SET_NAME) as WARNING
-> FROM
-> information_schema.COLUMNS
-> WHERE
-> TABLE_SCHEMA NOT IN ('information_schema', 'mysql', 'performance_schema', 'sys', 'tmp') AND
-> CHARACTER_SET_NAME in ('utf8', 'utf8mb3')
-> ;