SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    May 2008
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    copy contents from one table to another

    I need some help on how to copy contents from one table to another within the same mysql database.
    i want this to run within an activation file.

    thanks

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,992
    Mentioned
    186 Post(s)
    Tagged
    2 Thread(s)
    AFAIK, if you want to "clone" a table you can use 2 queries, first to replicate the structure and then to populate it. eg.
    CREATE TABLE new LIKE old
    INSERT new SELECT * FROM old


Bookmarks

Posting Permissions

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