I need to duplicate one row changing the PK. The table can be different in each client installation, so I can't just enumerate the columns. I've managed to do the following:
INSERT INTO table SELECT * FROM table WHERE PK='value'
but obviously it fails because I'm trying to duplicate the PK.
Then I tried:
INSER INTO table SELECT 'newValue' AS PK, * FROM table WHERE PK='value'
It also failed, because the column names didn't match.
I know the PK will always be the first column, but I'm not sure it's of much use.
So... Is this possible? Any idea?