描述:A表有 id,or_id 字段,B表有 id,code 字段
 
A表有  or_id 与B表的  id 关联,现要将A.or_id 替换成  B.code 数据
 
 UPDATE  A
SET A.OR_ID=(SELECT  code 
                   FROM  B
                   WHERE B.ID=A.OR_ID) 
 
 
 

相关文章:

  • 2022-01-02
  • 2022-12-23
  • 2022-02-04
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2022-01-12
  • 2021-09-26
猜你喜欢
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2021-06-25
相关资源
相似解决方案