Is it possible to query a MySQL database to get the column names of a table in alphabetical order? I know that
SHOW COLUMNS `table_name`;
The ANSI INFORMATION_SCHEMA tables (in this case, INFORMATION_SCHEMA.COLUMNS) provide more flexibility in MySQL:
SELECT c.column_name FROM INFORMATION_SCHEMA.COLUMNS c WHERE c.table_name = 'tbl_name' -- AND c.table_schema = 'db_name' ORDER BY c.column_name