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+'实现编译器对函数的字符串形式的认可

 

posted on 2017-08-11 11:37  编程007  阅读(131)  评论(0编辑  收藏  举报