Let's show the MERGE statement in the following example. We will still use the Landing.Products table populated in the previous section. We also will create a new Staging schema and insert the schema into a new table, named Staging.Products.
Let's start to create the staging table. This will be better normalized and it will also include one new column called Discontinued. The following code shows its creation:
USE DemoCustgoCREATE SCHEMA Staging AUTHORIZATION dbogoCREATE TABLE Staging.Products(Id int not null IDENTITY, ProductKey int not null, ProductName nvarchar(50) not null, ListPrice dec(8, 2) not null, Discontinued bit ...