

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can we check the character set of all the tables in a particular MySQL database?
With the help of the following MySQL query we can check the character sets of all the tables in a particular database −
mysql> Select TABLE_NAME, CHARACTER_SET_NAME FROM INFORMATION_SCHEMA.Columns Where TABLE_SCHEMA = 'db_name';
Example
For example, the query below returns the character sets of all the tables in a database named ‘Alpha’.
mysql> Select TABLE_NAME, CHARACTER_SET_NAME FROM INFORMATION_SCHEMA.Columns Where TABLE_SCHEMA = 'Alpha'; +------------+--------------------+ | TABLE_NAME | CHARACTER_SET_NAME | +------------+--------------------+ | employee | latin1 | | employee | latin1 | | student | latin1 | | student | NULL | | student | latin1 | +------------+--------------------+ 5 rows in set (0.06 sec)
The output shows 5 rows, 2 for employee table and 3 for student table because table employee contains two columns and table student contains three columns.
- Related Questions & Answers
- How can I check the character set of all the tables along with column names in a particular MySQL database?
- How can we check the default character sets of a particular MySQL database?
- How Can I check the size of the tables in a particular MySQL database?
- How can we analyze the tables of a particular database from MySQL Server command line?
- How to check table status of the tables in a particular MySQL database?
- How can we get the list of tables in a particular database from MySQL Server command line?
- In MySQL, how can we get the number code of a particular character?
- How can we check the list of all triggers in a database?
- How can we see the list of views stored in a particular MySQL database?
- How can we check the default character sets of all the MySQL databases we have on the server?
- How can I check MySQL tables from a database in accordance with particular column/s name?
- How can I check the list of MySQL tables, in the current database we are using, along with table type in the result set?
- How can we see only the list of stored procedures in a particular MySQL database?
- How can we see only the list of stored functions in a particular MySQL database?
- List down all the Tables in a MySQL Database
Advertisements