Answers for "find tables with column name mysql"

SQL
2

mysql find tables with name

SELECT table_name 
FROM information_schema.tables 
WHERE table_type = 'base table' AND table_name like '%YOUR TABLE NAME%';
Posted by: Guest on May-28-2020
1

mysql find tables with column name

SELECT DISTINCT TABLE_NAME 
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE COLUMN_NAME IN ('columnA','ColumnB')
        AND TABLE_SCHEMA='YourDatabase';
Posted by: Guest on April-09-2020
0

find a column in all tables mysql

SELECT DISTINCT TABLE_NAME 
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE COLUMN_NAME IN ('columnA','ColumnB')
        AND TABLE_SCHEMA='YourDatabase';
Posted by: Guest on April-08-2021

Code answers related to "find tables with column name mysql"

Code answers related to "SQL"

Browse Popular Code Answers by Language