hi

ALTER TABLE `database1`.`tablename` ADD `newfield` TINYINT NOT NULL;
ALTER TABLE `database2`.`tablename` ADD `newfield` TINYINT NOT NULL;
ALTER TABLE `database3`.`tablename` ADD `newfield` TINYINT NOT NULL;
ALTER TABLE `database4`.`tablename` ADD `newfield` TINYINT NOT NULL;


etc

or script it using a loop changing the database name each time


-----------------------------------------------
Excellence in internet and open source software
-----------------------------------------------
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
-----------------------------------------------

-----Original Message-----
From: JuppJacke [mailto:[EMAIL PROTECTED]]
Sent: 10 October 2002 09:22
To: Mysql Mailinglist
Subject: Updating the same Databases with new fields automatically


Hi,

i am looking for a easy way to update MySQL-databases and -tables which have
the same structure.

For example "Database1" has the same structure and tables as "Database 2".

Now i add new datafields in "Database1" and i i also want them to be in
"Database 2".

And when you dont have only two databases which are same then it is a lot of
work to do it in all databases and to add the new fields there.

Is there any way for an automatic process of updating several databases with
the same new fields.

I am looking for a way to program this or for tool or both.

Thanks a lot to a mysql beginner.

Gerd


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to