I need to duplicate one line modifying PK. Each client installation may have a different table, so I cannot just list the columns. I managed to do the following:
INSERT INTO table SELECT * FROM table WHERE PK='value'
but obviously it fails because I'm trying to duplicate a PC.
Then I tried:
INSERT INTO table SELECT 'newValue' AS PK, * FROM table WHERE PK='value'
It also failed because the column names did not match.
I know that a PC will always be the first column, but I'm not sure if it is very useful.
So ... is this possible? Any idea?
raven source
share