UPDATE if exists else INSERT in SQL Server 2008
26327
Solutions for INSERT OR UPDATE on SQL Server
135734
How to add column if not exists on PostgreSQL?
112077
How to check if a value already exists to avoid duplicates?
25134
How do I perform an IF...THEN in an SQL SELECT?
8616
Insert into select and update in single query
119655
How can I do a BEFORE UPDATED trigger with sql server?
63056
Subquery using Exists 1 or Exists *
14250
SQL Server--If logic in stored procedure and the plan cache
117531
Best practice between using LEFT JOIN or NOT EXISTS
78041
android update database column based on the current column value
94473
What is the best way to auto-generate INSERT statements for a SQL Server table?
9397
Oracle: If Table Exists
108393
Update a table using JOIN in SQL Server?
67443
How to prevent duplicate records being inserted with SqlBulkCopy when there is no primary key
43862
Check if table exists and if it doesn't exist, create it in SQL Server 2008
74706
if (select count(column) from table) > 0 then
131790
SQL Server update primary key that's also a foreign key in two tables