导出mysql中数据到csv中
通过 mysql -e 的方式导出数据.
mysql -uuser -ppwd -hxxxx.aliyuncs.com -P3306 db1 -e "select distinct concat(t.sign,','),concat(s.nick,',') from ma m left outer join template t on m.tpl_id=t.tpl_id left outer join shop_info s on t.shop_uid=s.sid where m.send_mode=1 and send_time between '2015-06-01' and '2015-06-30 23:59:59' limit 50;">xx.csv
然后对文件编码用文本编辑器修改下,修改成gbk的样式.
相关推荐
CoderToy 2020-11-16
emmm00 2020-11-17
王艺强 2020-11-17
ribavnu 2020-11-16
bianruifeng 2020-11-16
wangshuangbao 2020-11-13
苏康申 2020-11-13
vivenwan 2020-11-13
moyekongling 2020-11-13
云中舞步 2020-11-12
要啥自行车一把梭 2020-11-12
aydh 2020-11-12
kuwoyinlehe 2020-11-12
minerk 2020-11-12
vitasfly 2020-11-12
jazywoo在路上 2020-11-11
敏敏张 2020-11-11
世樹 2020-11-11