SELECT table_name,GROUP_CONCAT(column_name ORDER BY ordinal_position)
FROM information_schema.columns
WHERE table_schema = DATABASE()
GROUP BY table_name
ORDER BY table_name
select
TABLE_SCHEMA,
TABLE_NAME,
COLUMN_NAME
from
information_schema.columns
where
table_schema = 'database_name'
order by
table_name,
ordinal_position;