打赏

sqlserver 用一个表的值 更新另一个表

update   cas  set  cas.DocumentHeaderIdOfTransferredForForm   =  apply.Id   
  from   dbo.CaseTransfer   cas   
  join   dbo.DocumentHeader noti    
  on    noti.Id = cas.DocumentHeaderId
  JOIN dbo.DocumentHeader apply ON noti.CheckMissionId=apply.CheckMissionId

 

posted @ 2018-06-13 15:18  KiteRunner1988  阅读(835)  评论(0编辑  收藏  举报