How to find all the tables in MySQL with specific column names in them?

Jobi Joy

I have 2-3 different column names that I want to look up in the entire DB and list out all tables which have those columns. Any easy script?

Ken

To get all tables with columns columnA or ColumnB in the database YourDatabase:

SELECT DISTINCT TABLE_NAME 
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE COLUMN_NAME IN ('columnA','ColumnB')
        AND TABLE_SCHEMA='YourDatabase';

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to find all the tables in database Teradata with specific column names in them?

From Dev

A query to list the names of all tables that contain a column with a specific name

From Dev

A query to list the names of all tables that contain a column with a specific name

From Dev

How to find tables all relation in MySQL

From Dev

How to check all column names of Tables in oracle with regex?

From Dev

How to get a list of all tables from the database together with column names

From Dev

How to find all the posts with a specific tag in Ghost and iterate over them?

From Dev

How to update a specific characters of column value for all tables in a database

From Dev

How to find all tables having a specific foreign key?

From Dev

MySQL query all distinct from column A where none of them has a specific value in column B

From Dev

MySQL query all distinct from column A where none of them has a specific value in column B

From Dev

How to get all names of the column in MySql database to display in comboBox

From Dev

How to get ALL column names using mysql and php

From Dev

Get the different column names on two tables MySQL

From Dev

Get the different column names on two tables MySQL

From Dev

How to show all tables with column header as "Text" in mysql

From Dev

how can I find files based on different names and delete all them in one single line

From Dev

Return all column names contain specific value

From Java

Find all table names with column name?

From Dev

How to find table names which have a same value in other tables based aone column

From Dev

How to check if a given data exists in multiple tables(all different column names)

From Dev

How to select two tables compare them and get a single column value in PHP Mysql

From Dev

Find all tables that have X column name

From Dev

Changing multiple column names but not all of them - Pandas Python

From Dev

How to display all rows in a MySQL table with a specific column value?

From Dev

How to display all rows in a MySQL table with a specific column value?

From Dev

MySql select all tables with multiple specific columns

From Dev

List all MySQL tables and exclude specific one

From Dev

In MySQL how to join tables using their names which are based on column values of another table?

Related Related

  1. 1

    How to find all the tables in database Teradata with specific column names in them?

  2. 2

    A query to list the names of all tables that contain a column with a specific name

  3. 3

    A query to list the names of all tables that contain a column with a specific name

  4. 4

    How to find tables all relation in MySQL

  5. 5

    How to check all column names of Tables in oracle with regex?

  6. 6

    How to get a list of all tables from the database together with column names

  7. 7

    How to find all the posts with a specific tag in Ghost and iterate over them?

  8. 8

    How to update a specific characters of column value for all tables in a database

  9. 9

    How to find all tables having a specific foreign key?

  10. 10

    MySQL query all distinct from column A where none of them has a specific value in column B

  11. 11

    MySQL query all distinct from column A where none of them has a specific value in column B

  12. 12

    How to get all names of the column in MySql database to display in comboBox

  13. 13

    How to get ALL column names using mysql and php

  14. 14

    Get the different column names on two tables MySQL

  15. 15

    Get the different column names on two tables MySQL

  16. 16

    How to show all tables with column header as "Text" in mysql

  17. 17

    how can I find files based on different names and delete all them in one single line

  18. 18

    Return all column names contain specific value

  19. 19

    Find all table names with column name?

  20. 20

    How to find table names which have a same value in other tables based aone column

  21. 21

    How to check if a given data exists in multiple tables(all different column names)

  22. 22

    How to select two tables compare them and get a single column value in PHP Mysql

  23. 23

    Find all tables that have X column name

  24. 24

    Changing multiple column names but not all of them - Pandas Python

  25. 25

    How to display all rows in a MySQL table with a specific column value?

  26. 26

    How to display all rows in a MySQL table with a specific column value?

  27. 27

    MySql select all tables with multiple specific columns

  28. 28

    List all MySQL tables and exclude specific one

  29. 29

    In MySQL how to join tables using their names which are based on column values of another table?

HotTag

Archive