mysql 导出指定列到文件

来源:互联网 发布:联想网络同传软件下载 编辑:程序博客网 时间:2024/06/16 14:51

直接在-e 里面执行你要的sql语句最后的参数是数据库名

mysql -uroot -pXXX -e "select host from hostinfo where tagged=1" db_hostlabel >./host.txt


0 0
原创粉丝点击