美文网首页
T-SQL批量更新、删除

T-SQL批量更新、删除

作者: Binary_r | 来源:发表于2021-01-09 16:05 被阅读0次
    DELETE A
    OUTPUT
        DELETED.PORequestID,
        DELETED.BackOrderID,
        GETDATE(),
        @RequestUserID,
        DELETED.LastEditDate,
        DELETED.LastEditUser
    INTO aaa.dbo.bbb
    (
        PORequestID,
        BackOrderID,
        InDate,
        InUser,
        LastEditDate,
        LastEditUser
    )
    FROM aaa.dbo.ccc AS A
    INNER JOIN @TempTable AS T
      ON A.BackOrderID = T.BufferID
    

    更新同理,进行关联表操作

    相关文章

      网友评论

          本文标题:T-SQL批量更新、删除

          本文链接:https://www.haomeiwen.com/subject/fcbcaktx.html