Is there a purely SQL way to do this?
I have a table apples: id, price, and another apple_info: apple_id, color
For each row in apples, I want to add a corresponding row in apple_info, if it does not already exist. Can’t find any examples of this.
Try this:
You will insert a row on
apple_infowith non existentapple_idand a fixed value forcolor. I guess this is what you want.