需求如题,一开始觉得好简单,上手一写,发现纯dml貌似无法完成,写了个小命令
1、-e 在shell中直接执行sql语句
mysql -h localhost -u root -e "select * from ad.am_account" > xjs_data.txt
读出的数据:id col2 col3 telephone ...
1 XX XX 18888888888
需求如题,一开始觉得好简单,上手一写,发现纯dml貌似无法完成,写了个小命令
1、-e 在shell中直接执行sql语句
mysql -h localhost -u root -e "select * from ad.am_account" > xjs_data.txt
读出的数据:id col2 col3 telephone ...
1 XX XX 18888888888