#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    5
    Rep Power
    0
    Does anyone know a good way to dump all the existing records in one MySql table into another existing MySql table? Both tables are identical in structure, but the data fron Table1 needs to update all the data in Table2.

    (I know how to do it one row update at a time, but because of the nature of the beast, I need it to do the whole table at once (13 rows), rather than one row at a time.)
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,647
    Rep Power
    4493
    look in the mysql manual for
    select * into outfile 'file.txt' from table1;

    this will create a tab or comma delimited file that can then be loaded into table two with

    load data infile 'file.txt' into table table2;

    check the manual for exact syntax...

    ---John Holmes...

Similar Threads

  1. Replies: 1
    Last Post: January 30th, 2004, 07:04 PM
  2. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 07:19 PM
  3. Scratch table error in MySQL
    By byte me in forum MySQL Help
    Replies: 11
    Last Post: January 20th, 2004, 12:51 PM
  4. Validate PHP form and update MySQL table
    By tlugosi in forum PHP Development
    Replies: 2
    Last Post: January 18th, 2004, 03:26 PM
  5. Replies: 1
    Last Post: January 16th, 2004, 08:39 PM

IMN logo majestic logo threadwatch logo seochat tools logo