今天想写条语句

UPDATE t_resource_structure SET second_root_id = '4F86397B-2B48-613B-3F2B-8ACB5A8B625B' 
where structure_id not in (SELECT structure_id FROM t_resource_structure WHERE structure_id = 'BADA453D-B319-54B9-9FA0-CFF4C771A833' OR is_xdkm_root = 1);

怎么执行都报错,后来发现,在mysql中需要这样写

UPDATE t_resource_structure SET second_root_id = '4F86397B-2B48-613B-3F2B-8ACB5A8B625B' 
where structure_id not in (SELECT a.structure_id FROM (SELECT * FROM t_resource_structure WHERE structure_id = 'BADA453D-B319-54B9-9FA0-CFF4C771A833' OR is_xdkm_root = 1) a);

还是不熟悉mysql啊。。。

相关文章:

  • 2022-12-23
  • 2021-08-01
  • 2021-07-09
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2021-10-15
  • 2022-12-23
猜你喜欢
  • 2022-02-10
  • 2022-01-18
  • 2022-12-23
  • 2021-09-30
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案