 |
Using MERGE in SQL Server to insert, update and delete at the same time
MERGE SQL statement - Part 1--Create a target table CREATE TABLE Products ( ProductID INT PRIMARY KEY, ProductName VARCHAR(100), Rate MONEY ) GO --Insert records into target table INSERT INTO Products VALUES (1, 'Tea', 10.00), (2, 'Coffee', 20.00), (3 ...
www.mssqltips.com |
 |