问题场景
在MySQL中,需要以逗号拼接一个表的所有字段
sql语句
SELECT GROUP_CONCAT(COLUMN_NAME SEPARATOR ",") FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = 'db_name' AND TABLE_NAME = 'table_name'
转自:http://blog.csdn.net/sand_clock/article/details/74533605
在MySQL中,需要以逗号拼接一个表的所有字段
SELECT GROUP_CONCAT(COLUMN_NAME SEPARATOR ",") FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = 'db_name' AND TABLE_NAME = 'table_name'
转自:http://blog.csdn.net/sand_clock/article/details/74533605