List column names in a MySQL table

March 17, 2015

This will allow you to quickly and easily select a list of column names from a MySQL table.

SELECT distinct column_name
FROM information_schema.columns
WHERE table_name='{YOUR TABLE NAME}'
Leave a Reply

Your email address will not be published. Required fields are marked *