Answers for "mysql get table field names"

SQL
3

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
0

mysql get only the field names in a table

SELECT column_name
FROM information_schema.columns
WHERE  table_name = 'your_table'
   AND table_schema = 'database_name'
Posted by: Guest on September-23-2021

Code answers related to "mysql get table field names"

Code answers related to "SQL"

Browse Popular Code Answers by Language