MySQL的sql语句取shell程序中的forin多变量一例

#!/bin/bash
a=(`cat time.txt`)
b=(`cat sum.txt`)
for (( i = 0; i < 38; i++))
do
/bin/MySQL -u test -p'test' -h localhost -P 3306 <<EOF
update billing.test set scan_first_sum='${b[$i]}' where project='zjpj' and date='${a[$i]}';
select * from chenfeng.test where project='zjpj' and date='${a[$i]}' and scan_first_sum='${b[$i]}';
EOF
done
#echo ${a[$i]} ${b[$i]}

网站栏目:MySQL的sql语句取shell程序中的forin多变量一例
分享地址:https://www.cdcxhl.com/article24/giphce.html

成都网站建设公司_创新互联,为您提供自适应网站软件开发营销型网站建设标签优化全网营销推广小程序开发

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

网站托管运营