Fedora Linux Support Community & Resources Center
  #1  
Old 7th May 2009, 06:01 PM
sevmax Offline
Registered User
 
Join Date: Jan 2008
Posts: 32
execute `alter table` for a lot of tables

Hello, community.
You piece of advice will be very useful for me!
How to execute "ALTER TABLE" for a lot of tables in database? I'm going to change engine from MyISAM to NDBCLUSTER. There are several hundreds of tables in database.
Command like
Code:
ALTER TABLE * ENGINE=NDBCLUSTER
isn't working.
I believe in your help!

Regards,
sevmax
Reply With Quote
  #2  
Old 9th May 2009, 03:26 AM
jim1944 Offline
Registered User
 
Join Date: Jun 2007
Posts: 264
I'm not an SQL expert but I know enough to not expect
Code:
ALTER TABLE * ENGINE=NDBCLUSTER
to work.

This isn't really a Fedora issue or even a Linux issue. You might be better off looking for a forum dedicated to database stuff.

Jim
Reply With Quote
  #3  
Old 9th May 2009, 02:28 PM
nico80 Offline
Registered User
 
Join Date: Dec 2007
Location: Edinburgh
Age: 33
Posts: 114
the mysql forum would be a better place to ask...

anyway it's easily done with a simple php script that executes

SHOW TABLES

to get the tables names and then cycles through each result to do alter the table
Reply With Quote
  #4  
Old 9th May 2009, 02:34 PM
kromberg Offline
Registered User
 
Join Date: Mar 2008
Posts: 135
You can also write a simple stored procedure to do this.
Reply With Quote
Reply

Tags
execute, lot, tables, table`, `alter

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to alter Fedora or Firefox to allow connectivity with Employers obby Using Fedora 1 14th October 2008 07:10 PM
How to alter display resolution ? po11745 Hardware & Laptops 1 7th April 2007 11:17 AM
Cannot alter resolution vze4p6c2 Using Fedora 4 28th February 2007 01:46 AM
how to alter grub/default os and enable windows sharing netconsultant Installation, Upgrades and Live Media 4 22nd June 2005 02:49 PM


Current GMT-time: 07:47 (Saturday, 25-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Sarcelles Travel Photos - Kumo Photos on Instagram - Al Burayj Travel Photos on Instagram