Last active
June 1, 2016 09:42
-
-
Save yangl/3d40e22e95f2fa8844b1a0812113c2af to your computer and use it in GitHub Desktop.
查询SQL并输出,动态拼表名
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd=`date -d yesterday "+%Y%m%d"` | |
sql="select count(1) c, status from t_customgift_${dd} where if_outapppush=1 group by status;" | |
mysql -h10.10.130.109 -ugrowth_log -pgrowth_uxin_com -Dgrowth -P3307 -e "${sql}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment