Hi there, Everyone:
I would like to copy certain fields to a NEW ROW in the same table in a MySQL database.
For example, the structure Might look like this:
ID (primary key) | SKU | TYPE | VALUE
0001 | ABC321 | phone_number | 555-1212
I would like to COPY the SKU field (ABC321) and the VALUE field (555-1212) but would like to have a NEW value for the TYPE field (change it from phone_number to custom_phone).
And of course, the ID (which is a primary key) should be populated automatically.
So in my example, I would like to take this data:
0001 | ABC321 | phone_number | 555-1212
And copy it into:
0002 | ABC321 | custom_phone | 555-1212
Also, how can I use ignore so that it doesn't create a duplicate row if one already exists?
Thanks in advance.