Mysql get all fields of table
select COLUMN_NAME from information_schema.COLUMNS where table_name = 'your_table_name'; select COLUMN_NAME from information_schema.COLUMNS where table_name = 'your_table_name' and table_schema = 'your_db_name';
Take out all fields and display them on one line (separated by commas)
select group_concat(COLUMN_NAME SEPARATOR ',') from information_schema.COLUMNS where table_name = 'tableName';