
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
What is the query to check Character set of the columns of MySQL table?
Following is the query to check character set of the columns of MySQL table −
mysql> Select Column_name 'Column', Character_set_name 'Charset' FROM information_schema.columns where table_schema = 'db_name' and table_name ='table_name';
Example
For example, the query below returns the name of the columns of ‘test_char_set’ table in a database named ‘sample’ along with the character sets of those columns.
mysql> Select Column_name 'Column', Character_set_name 'Charset' FROM information_schema.columns where table_schema = 'Sample' and table_name ='test_char_set'; +--------+---------+ | Column | Charset | +--------+---------+ | Name | latin1 | | Field | latin1 | +--------+---------+ 2 rows in set (0.03 sec)
- Related Articles
- Set all the columns of a MySQL table to a particular value with a single query
- How to get the datatype of MySQL table columns?
- How do I see what character set a MySQL database / table / column is?
- What is the use of CHECK TABLE statement in maintaining the MySQL tables?
- What are the restrictions, in terms of a number of rows and columns, with MySQL query having no table list?
- What is the query to know about all character sets supported by MySQL?
- How can I return the values of columns from MySQL table as a set of values?
- How can we check the character set of all the tables in a particular MySQL database?
- MySQL query to find the number of occurrences from two columns?
- MySQL query to exclude some of the values from the table
- MySQL query to display ranks of multiple columns?
- MySQL query to select all the records only from a specific column of a table with multiple columns
- Set the default character set in MySQL
- Get the number of columns in a MySQL table?
- How to find the number of columns in a MySQL table?

Advertisements