MYSQL 获取某个表的各列名(字段名)并以逗号连接:
- SELECT GROUP_CONCAT( COLUMN_NAME SEPARATOR "," ) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'YOUR_DATABASE' AND TABLE_NAME = 'YOUR_TABLE'
MYSQL 获取某个表的各列名(字段名)并以逗号连接:
- SELECT GROUP_CONCAT( COLUMN_NAME SEPARATOR "," ) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'YOUR_DATABASE' AND TABLE_NAME = 'YOUR_TABLE'