Answers for "MySQL query to get column names"

SQL
2

MySQL query to get column names

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

Code answers related to "SQL"

Browse Popular Code Answers by Language