本文共 446 字,大约阅读时间需要 1 分钟。
1、MySQL如何实现非交互式查询?
mysql -h 172.16.136.9 -P6515 -u user -ppasswd db_name -e 'select * from game_flow_balance where activityID = "yWyY1oi2" and (status = "2" or status ="4");' 注意:-e 非交互 单引号内为查询语句。2、如何存入execl表内?
直接输入到xls结尾的文件内mysql -h 172.16.136.9 -P6515 -u user -ppasswd db_name -e 'select * from game_flow_balance where activityID = "yWyY1oi2" and (status = "2" or status ="4");' >> /tmp/neimeng3.xls转载于:https://blog.51cto.com/jingfeng/2154169