如果表中没有很好的列 来确定 唯一行,不防用一下这个 方法 还是比较精准的
update db set a=11111 from (select row_number() over ( order by a) as id ,a from #b) as db where id=2
如果表中没有很好的列 来确定 唯一行,不防用一下这个 方法 还是比较精准的
update db set a=11111 from (select row_number() over ( order by a) as id ,a from #b) as db where id=2
一个简单的 用row_number() over 限定 更新的例子
https://blog.coolsre.com/archives/yi-ge-jian-dan-de-yong-row_number-over-xian-ding-geng-xin-de-li-zi
评论