List:General Discussion« Previous MessageNext Message »
From:Lee Denny Date:April 19 2005 9:54am
Subject:Duplication of records within the same table.
View as plain text  

I've got a table with a simple structure:

site_id, page_id,header_text,main_text..

I just need to duplicate existing records with a new site_id, so :

1,1,Hello,some text..
1,2,Hello Again, some more text...

gets copied to

2,3,Hello,some text..
2,4,Hello Again, some more text...

page_id is already auto_increment.

I'm sure that an INSERT .. SELECT statement should do it, but I'm unsure of
the correct syntax.



Duplication of records within the same table.Lee Denny19 Apr
  • Re: Duplication of records within the same table.Jigal van Hemert19 Apr