FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Posts
    33

    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

  2. #2
    Join Date
    Jun 2007
    Posts
    301
    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

  3. #3
    Join Date
    Dec 2007
    Location
    Edinburgh
    Age
    37
    Posts
    116
    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

  4. #4
    Join Date
    Mar 2008
    Posts
    135
    You can also write a simple stored procedure to do this.

Similar Threads

  1. Replies: 1
    Last Post: 14th October 2008, 07:10 PM
  2. How to alter display resolution ?
    By po11745 in forum Hardware & Laptops
    Replies: 1
    Last Post: 7th April 2007, 11:17 AM
  3. Cannot alter resolution
    By vze4p6c2 in forum Using Fedora
    Replies: 4
    Last Post: 28th February 2007, 02:46 AM
  4. how to alter grub/default os and enable windows sharing
    By netconsultant in forum Installation, Upgrades and Live Media
    Replies: 4
    Last Post: 22nd June 2005, 02:49 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •