I want to do this
INSERT INTO AdminAccounts (Name)
SELECT Name
FROM Matrix
But I don't want to create duplicates. ie, I ran this a few weeks ago and need to update the data.
|
|
|
This will insert new Name fields that were not previously in the Matrix table.
If you do not trust
The table |
|||||
|
|
This post should answer your question: http://stackoverflow.com/questions/1218905/how-do-i-update-if-exists-insert-if-not-aka-upsert-or-merge-in-mysql Syntax : Insert ... On Duplicate Key Update |
|||
|
|
|
|||
|
|