Mrfei 发表于 2018-10-3 10:27:28

mysql 非交互查询 存入execl

  1、MySQL如何实现非交互式查询?
  mysql -h 172.16.136.9 -P6515-uuser -ppasswddb_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-uuser -ppasswddb_name -e 'select * from game_flow_balance where activityID = "yWyY1oi2" and (status = "2" or status ="4");' >> /tmp/neimeng3.xls

页: [1]
查看完整版本: mysql 非交互查询 存入execl