MySQL - See the character set of Schema, Table, and Column
See the character set of Schema, Table, and Column in MySQL
1. For Schemas:
SELECT
default_character_set_name
FROM
information_schema.SCHEMATA
WHERE
schema_name = 'schema_name';
2. For Tables:
SELECT
CCSA.character_set_name
FROM
information_schema. `TABLES` T,
information_schema. `COLLATION_CHARACTER_SET_APPLICABILITY` CCSA
WHERE
CCSA.collation_name = T.table_collation
AND T.table_schema = 'schema_name'
AND T.table_name = 'table_name';
3. For Columns:
SELECT
character_set_name
FROM
information_schema. `COLUMNS`
WHERE
table_schema = 'schema_name'
AND table_name = 'table_name'
AND column_name = 'column_name';
Or you can choose to show all properties of columns:
SHOW
FULL COLUMNS
FROM
'table_name';
Need a good GUI Tool for MySQL? TablePlus is a modern, native tool with an elegant UI that allows you to simultaneously manage multiple databases such as MySQL, PostgreSQL, SQLite, Microsoft SQL Server and more.
Not on Mac? Download TablePlus for Windows.
On Linux? Download TablePlus for Linux
Need a quick edit on the go? Download TablePlus for iOS.