How can i copy one MySQL table contents to another table?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brizzad
    holla
    • Jul 2003
    • 11769

    #1

    How can i copy one MySQL table contents to another table?

    I was trying to upgrade some forums, and did something wrong along the way, long story short, all of my threads/posts/users are stored in one table and they need to be moved over to the table that my forums are looking for

    is there a simple query i can run?
  • rickholio
    Confirmed User
    • Jan 2004
    • 1914

    #2
    You can either rename the table:

    RENAME TABLE tbl_name TO new_tbl_name

    Or recreate the table in the correct spot and insert them:

    INSERT INTO new_table SELECT * FROM old_table

    HTH. HAND.
    ~

    Comment

    • brizzad
      holla
      • Jul 2003
      • 11769

      #3
      Originally posted by rickholio
      You can either rename the table:

      RENAME TABLE tbl_name TO new_tbl_name

      Or recreate the table in the correct spot and insert them:

      INSERT INTO new_table SELECT * FROM old_table

      HTH. HAND.

      thanks

      Comment

      • Calvinguy
        Confirmed User
        • Oct 2002
        • 1752

        #4
        phpmyadmin usually take care of all my mysql actions

        Comment

        Working...