Answers for "find column name in database mysql"

SQL
4

search column by name mysql

select table_name, column_name 
from information_schema.columns 
where column_name like '%search_keyword%'; -- change search_keyword accordingly
Posted by: Guest on June-16-2021
2

mysql get column names from table

SELECT `COLUMN_NAME` 
FROM `INFORMATION_SCHEMA`.`COLUMNS` 
WHERE `TABLE_SCHEMA`='yourdatabasename' 
    AND `TABLE_NAME`='yourtablename';
Posted by: Guest on December-18-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

mysql to get column name in database

SELECT table_name, column_name from information_schema.columns WHERE column_name LIKE '%column_name_to_search%';
Posted by: Guest on October-30-2020

Code answers related to "find column name in database mysql"

Code answers related to "SQL"

Browse Popular Code Answers by Language