MySQL get all column names

This command will get all column names in one table

SELECT `COLUMN_NAME`  
FROM `INFORMATION_SCHEMA`.`COLUMNS`  
WHERE `TABLE_SCHEMA`='insertdatabasename'  
    AND `TABLE_NAME`='inserttablename';

This will get columns from all tables

SELECT `COLUMN_NAME`  
FROM `INFORMATION_SCHEMA`.`COLUMNS`  
WHERE `TABLE_SCHEMA`='insertdatabasename';  

This will only get unique names (prevent duplicate names)

SELECT DISTINCT(`COLUMN_NAME`)  
FROM `INFORMATION_SCHEMA`.`COLUMNS`  
WHERE `TABLE_SCHEMA`='insertdatabasename';