Ok, there is another approach if you are using shell script. Step 1: You may invoke one mysql user who has not password to access the mysql database. Step 2: Shell script:
c=0 for i in `mysql -u username -e "use database;show tables;"` do if [ $c -ge 1 ] then mysql -u username -e "use database;update $i set client='NEW'" fi let c=$c+1 done ________________________________ 发件人: Ananda Kumar <anan...@gmail.com> 收件人: Pothanaboyina Trimurthy <skd.trimur...@gmail.com> 抄送: mysql@lists.mysql.com 发送日期: 2012年4月30日, 星期一, 下午 5:26 主题: Re: update query Do you just want to replace current value in client column to "NEW". You can write a stored proc , with a cursor and loop through the cursor, update each table. regards anandkl On Mon, Apr 30, 2012 at 2:47 PM, Pothanaboyina Trimurthy < skd.trimur...@gmail.com> wrote: > Hi all, > i have one database with 120 tables and each table contains one > common column that is "client" now i want to update all the tables > column client = "NEW". is it possible to write a single query to > update this one. > > please help me. > > thanks in advance > > Thanks & Kind Regards, > Trimurthy.p > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql > >