alter table `$j` add `zoneID` int(6) NOT NULL default 0;
去掉反引号,否则shell会误认作shell命令:
for i in $db;
do
tb=$(mysql -uroot -p123456 -e "use $i;show tables"|grep "user_");
echo ===$i====;
for j in $tb;
do echo $j;
mysql -uroot -p123456 -e "use $i;alter table $j add zoneID int(6) NOT NULL default 0;"
done;
done
阅读(2000) | 评论(0) | 转发(0) |