I have a table with primary key id AUTOINCREMENT
and some other attributes.
I have many rows with attribute lang='en'. and I do
DELETE FROM ".MY_PRF."form WHERE `lang` <> 'en'
I want to COPY all them changing lang to 'cz'
I use:
INSERT INTO form (`lang`, `caption`, `type`)
SELECT 'cz', `caption`, `type`
FROM form
WHERE lang = 'en'
This query produces an error
Duplicate entry '127' for key 1
I don't know what's happening cause primary key is autoincrement
Please help me to solve my task. thanks.
Again, I want to copy rows with small change, the 'en' rows should remain