Merge into @TableName AS T
Using #TmpTable AS S
ON (T.Type = S.Type)
WHEN MATCHED
THEN UPDATE SET T.[TypeDesc]=S.[TypeDesc]
WHEN NOT MATCHED THEN
INSERT ([Type],[TypeDesc]) VALUES ([Type],[TypeDesc]);
CREATE TABLE #TmpTable (
[Type] [varchar](50) COLLATE CHINESE_PRC_BIN NULL,
[TypeDesc] [varchar](50) COLLATE CHINESE_PRC_BIN NULL,
)