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

mysql——某表所有记录的导出和导入——csv文件

时间:2019-12-28 09:57:53      阅读:96      评论:0      收藏:0      [点我收藏+]

标签:ble   use   users   close   from   style   des   code   let   

select * from cr01
into outfile C:/Users/del/Desktop/table1_data.csv
character set gb2312
fields terminated by , optionally enclosed by " escaped by "
lines terminated by \r\n

select * from cr01; delete from cr01;

load data infile C:/Users/del/Desktop/table1_data.csv into table cr01 character set gb2312 fields terminated by , optionally enclosed by " escaped by " lines terminated by \r\n;

技术图片

mysql——某表所有记录的导出和导入——csv文件

标签:ble   use   users   close   from   style   des   code   let   

原文地址:https://www.cnblogs.com/xiaobaibailongma/p/12110481.html

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