语法总忘,记一下

1
2
3
4
SELECT GROUP_CONCAT(COLUMN_NAME SEPARATOR ",") 
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = 'db_name'
AND TABLE_NAME = 'table_name'

修改db_nametable_name