首页 > 代码库 > sql MERGE

sql MERGE

MERGE INTO #a
 USING #b
 ON (#a.id_ = #b.id_)
WHEN NOT MATCHED BY SOURCE AND #a.date_<2017-09-13 09:43:48.140
THEN
UPDATE SET #a.date_=‘‘+GETDATE()+‘‘;--在有单引号的情况下用‘+x+‘实现编译器对函数的字符串形式的认可

 

sql MERGE