SELECT GROUP_CONCAT(COLUMN_NAME SEPARATOR ",") FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = ‘db_name‘ AND TABLE_NAME = ‘table_name‘
修改红色部分为自己数据库的名字和表名字
时间: 2024-10-10 17:08:16
SELECT GROUP_CONCAT(COLUMN_NAME SEPARATOR ",") FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = ‘db_name‘ AND TABLE_NAME = ‘table_name‘
修改红色部分为自己数据库的名字和表名字