Using MERGE in SQL Server to insert, update and delete at the same time

Using MERGE in SQL Server to insert, update and delete at the same time

瀏覽:1306
日期:2024-05-25
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 ......看更多