//文件存放的位置必须要有权限写入 select * from repair where id > 30 into outfile ‘/tmp/stud.txt' ; // 需要先建一个backup表 ,导出需要备份的表结构(记得一定要进去吧 DROP TABLE IF EXISTS `原表`; 一定要删掉,不然你会很开心的) 查询出来的字段和插入的字段一定要一样 insert into backup (title,short_description,post_at,content,cover_url,tag,sort,type_id,created_at,updated_at,deleted_at,contact,is_check,vip) select title,short_description,post_at,content,cover_url,tag,sort,type_id,created_at,updated_at,deleted_at,contact,is_check,vip from posts where id > 1684940;