码迷,mamicode.com
首页 > 数据库 > 详细

Mysql 按行dump出数据

时间:2016-06-27 19:40:12      阅读:249      评论:0      收藏:0      [点我收藏+]

标签:

mysqldump -u${user} -p${passwd} --skip-extended-insert --database ${dbname} --table ${tablename} > ${tablename}.sql

用以上语句导出的sql文件中,每条数据都按照一个INSERT语句来保存,方便用版本比较工具按行比较数据差异

例如

INSERT INTO `goods` VALUES (2,1049600,1,0,604800:88888:-1:-1:-1:-1:-1|,1464408000,1467019659,0,‘‘);
INSERT INTO `goods` VALUES (4,1049600,1,0,604800:88888:-1:-1:-1:-1:-1|,1464408000,1467019659,0,‘‘);
INSERT INTO `goods` VALUES (7,1049600,1,0,604800:88888:-1:-1:-1:-1:-1|,1464408000,1467019659,0,‘‘);
INSERT INTO `goods` VALUES (8,1049600,1,0,604800:88888:-1:-1:-1:-1:-1|,1464408000,1467019659,0,‘‘);

 

Mysql 按行dump出数据

标签:

原文地址:http://www.cnblogs.com/tangxin-blog/p/5620855.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!