mysql --host=_HOSTNAME --user=_USER --password=_PASSWORD -Bse "SELECT * FROM _TABLE" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > _FILE_NAME.csv
select * from _TABLE into outfile '_FILE_NAME.csv' fields terminated by ',' optionally enclosed by '\"' escaped by '\"';"
mysql导出数据到csv的两种方式
最新推荐文章于 2024-05-31 19:45:50 发布