List:General Discussion« Previous MessageNext Message »
From:Rick James Date:April 30 2012 4:42pm
Subject:RE: update query
View as plain text  
How many rows in each table?
If only one row, why is the schema designed that way?
If multiple rows, why are you changing _all_ rows that way?

I am questioning the schema design that would lead to your question.

Follow on to Ananda's answer:  See
   information_schema.TABLES  WHERE TABLE_SCHEMA = 'dbname'
   information_schema.COLUMNS  WHERE COLUMN_NAME = 'client'

> -----Original Message-----
> From: Ananda Kumar [mailto:anandkl@stripped]
> Sent: Monday, April 30, 2012 2:26 AM
> To: Pothanaboyina Trimurthy
> Cc: mysql@stripped
> Subject: 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.trimurthy@stripped> 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
> >
> >
Thread
update queryPothanaboyina Trimurthy30 Apr
  • Re: update queryAnanda Kumar30 Apr
    • 回复: update queryZhangzhigang30 Apr
    • RE: update queryRick James30 Apr