sql 取代游标的写法示例

前端之家收集整理的这篇文章主要介绍了sql 取代游标的写法示例前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<div class="jb51code">
<pre class="brush:sql;">
Update Tb_Garden1 G Set Steward = (
Select Id From Zyq.Tb_User U Where Replace(U.Name,'区') = G.Name And Rownum =1)
where exists (select 1 from zyq.tb_user u where Replace(U.Name,'区') = G.Name And rownum = 1)

原文链接:https://www.f2er.com/mssql/63225.html

猜你在找的MsSQL相关文章