解决方案 »

  1.   


    echo select * from tb20140801 where id>=100 and id<105;|mysql -hlocalhost -uroot -proot >result.csv在DOS窗口运行。
      

  2.   


    echo “select * from tb20140801 where id>=100 and id<105;”|mysql -hlocalhost -uroot -proot >result.csv加引号试过了,会报SQL语法错误。加引号在linux上运行正确,但在DOS下不行。
      

  3.   

    如果仅是执行这么句SQL,则直接用 mysql -e 参数算了。