Im trying to insert a bunch of rows into a table. If the row already
exists id like to update the row 'counter'. For example...
INSERT INTO table1
SELECT field1, field2
FROM table2
ON DUPLICATE KEY UPDATE field2 = 1
Is it possible to use both INSERT... SELECT... with ON DUPLICATE KEY?
I cant get it to work.
-Nick
exists id like to update the row 'counter'. For example...
INSERT INTO table1
SELECT field1, field2
FROM table2
ON DUPLICATE KEY UPDATE field2 = 1
Is it possible to use both INSERT... SELECT... with ON DUPLICATE KEY?
I cant get it to work.
-Nick
Comment