Tuesday, May 10, 2011

How to know the character set and collation of mysql database, table and column

Here are the SQL commands to know the character set and collation of mysql database and tables/columns

mysql> use database_name;
mysql> show variables like "character_set_database";
mysql> select data_type,collation_name from information_schema.columns where table_schema='database_name' and table_name='table_name' and column_name='column_name';

Sphere: Related Content

0 comments: