MySQL: How to copy rows, but change a few fields?
Posted
by Andrew
on Stack Overflow
See other posts from Stack Overflow
or by Andrew
Published on 2010-05-06T17:33:46Z
Indexed on
2010/05/06
17:38 UTC
Read the original article
Hit count: 168
I have a large number of rows that I would like to copy, but I need to change one field.
I can select the rows that I want to copy:
select * from Table where Event_ID = "120"
Now I want to copy all those rows and create new rows while setting the Event_ID
to 155
. How can I accomplish this?
© Stack Overflow or respective owner