欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

sql 取代游标的写法示例

程序员文章站 2023-08-13 19:57:09
update tb_garden1 g set steward = ( select id from zyq.tb_user u where replace(u....
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)