Ad Code

Group output of SHOW COLUMNS into comma-delimited list

Take a look at the information_schema.columns table
select group_concat(column_name order by ordinal_position)
from information_schema.columns
where table_schema = 'database_name' and table_name = 'table_name'

Post a Comment

0 Comments