oracle查询过滤为一条数据,修改另一个表的数据
user 相同身份证号码可能有多条数据,进行过滤
school 相同身份证号码也有可能有多条数据,关联条件用 in
update school set xb ='1' where l.id in(select xb from user )
sfzhm
oracle数据库:
update school l set name = (select name from user where statu='10' and and l.id =s.id and rownum = 1)
金仓数据库:
update school l set name = (select name from user where statu='10' and and l.id =s.id and limit 1)
每天多努力一点,你将会变得更好。