dps dps - 1 year ago 79
MySQL Question

Can you sort the output of SHOW COLUMNS or DESC?

Is it possible to (easily) sort the output of the SHOW COLUMNS or DESC MySQL Command?

Answer Source

you can sort the table names using order by but you have to select the column names from the information_schema below is the column names in alphabetical order

SELECT column_name
FROM information_schema.columns
WHERE table_name = 'table_name' ORDER BY column_name
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download