If INSERT into table fails then UPDATE table
38371
How to UPSERT (MERGE, INSERT ... ON DUPLICATE UPDATE) in PostgreSQL?
9397
Oracle: If Table Exists
52570
How to do an update + join in PostgreSQL?
106984
Why doesn't this MySQL update work?
115194
INSERT INTO with SubQuery MySQL
21930
Exception when trying to execute "REPLACE" against MS Access
25838
Mysql create trigger if not exist
11936
Insert into ... values ( SELECT ... FROM ... )
154568
Optimal way to ignore duplicate inserts?
21815
How to do INSERT into a table records extracted from another table
83895
SQL syntax error 170 in insert statement
12427
Insert results of a stored procedure into a temporary table
36268
Insert multiple rows WITHOUT repeating the "INSERT INTO ..." part of the statement?
52090
Temp table to Master table insert or update with auditing and logging
75719
Syntax error at position 7: no viable alternative at input 'table'
96662
Check that criteria are met in a before insert trigger
55133
mysql trigger / stored procedure - update another table row by row