You use Microsoft SQL Server 2012 to develop a database application. You create two tables by using the
following table definitions.
Which six Transact-SQL statements should you use? (To answer, move the appropriate SQL statements from
the list of statements to the answer area and arrange them in the correct order.)
Answer:
Hi. Anyone know right answer?
1, 8, 2, 6, 3, 5
This is hard one…
Merge CountryRegion as target
Using(select @CountryRegionCode,@Name) as source(CountrtRegionCode,Name)
On (target.CountrtRegionCode=source.CountrtRegionCode)
When not matched by target then
Insert into CountryRegion
(CountrtRegionCode,Name)
Values(@CountryRegionCode,@Name)
When matched then update set name=source.Name