mysql把一个表的字段update成另一个表的字段根据id
1.填充activity表里面的creator字段,用org的founderid,其中activity的orgid要和org的id对应,具体sql语句如下:
update activity a inner join (select id,founderid from org o) c on a.orgid =c.id  set a.creator = c.founderid;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-08
  • 2021-11-23
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
相关资源
相似解决方案