
- 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
How can I check MySQL tables from a database in accordance with particular
column/s name?
The following statement shows the list of two tables having a column ‘email’ in Sample database −
mysql> SELECT DISTINCT TABLE_NAME -> FROM INFORMATION_SCHEMA.COLUMNS -> WHERE COLUMN_NAME IN('EMAIL') -> AND TABLE_SCHEMA = 'SAMPLE'; +---------------+ | TABLE_NAME | +---------------+ | employee | | new_student | +---------------+ 2 rows in set (0.04 sec)
- Related Articles
- How Can I check the size of the tables in a particular MySQL database?
- 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 character set of all the tables in a particular MySQL database?
- How to check table status of the tables in a particular MySQL database?
- How can we analyze the tables of a particular database from MySQL Server command line?
- How can we get the list of tables in a particular database from MySQL Server command line?
- Given a column name how can I find which tables in a MySQL database contain that column?
- How can I query for all the tables having a particular column name?
- How do I select four random tables from a MySQL database having thousands of tables?
- How can we check the default character sets of a particular MySQL database?
- How can I check the tables of databases other than current database?
- Get a list of non-empty tables in a particular MySQL database?
- How can I describe all tables in the database through a single statement in MySQL?
- Can I use InnoDB and MyISAM tables in a single database in MySQL?
- How can we see the metadata of a view(s) stored in a particular MySQL database?

Advertisements