I have a table called notification, with two columns:
- provider
The values look like this:
- apple | apple@apple.com
- nbc | nbc@nbc.com
- nbc | me@me.com
- abc | abc@abc.com
- abc | me@me.com
For all providers that do not have the email me@me.com, I want to insert another row with the provider and the email them@them.com. For example, in the above query, the result of the INSERT statement would be: INSERT INTO notification VALUES ('apple', 'them@them.com').
I have a table with thousands of rows like this, how would I write such an INSERT statement?
1 Answer