How can I change this code to INSERT instead of UPDATE if content doesn't exist?
24417
"INSERT IGNORE" vs "INSERT ... ON DUPLICATE KEY UPDATE"
49655
Using ALTER to drop a column if it exists in MySQL
106579
insert if not exist from arraylist
69750
MySQL check if a table exists without throwing an exception
34957
Idiomatic way to implement UPSERT in PostgreSQL
146943
PHP/MySQL insert row then get 'id'
39945
Is it possible to save a reference to a not yet existing elment in JavaScript?
8616
Insert into select and update in single query
62914
Insert null/empty value in sql datetime column by default
91377
Add Auto-Increment ID to existing table?
106984
Why doesn't this MySQL update work?
38371
How to UPSERT (MERGE, INSERT ... ON DUPLICATE UPDATE) in PostgreSQL?
95344
How do I insert a row which contains a foreign key?
140976
Adding a line break in MySQL INSERT INTO text
26327
Solutions for INSERT OR UPDATE on SQL Server
112821
Why is it not possible to alter a view with a "CREATE OR REPLACE"?
104745
Insert query on page load, inserts twice?