一.问题描述:
第三篇 You can't specify target table 'xxx' for update in FROM clause
调试过程中遇到报错 You can’t specify target table ‘t_form_ship’ for update in FROM clause。
百度后发现该现象出现在MySQL中,MSSQL和Oracle不会出现此问题。
实验后得到SQL sever也不会报错
第三篇 You can't specify target table 'xxx' for update in FROM clause

二.解决方法——建立中间表
1.https://www.cnblogs.com/pcheng/p/4950383.html第三篇 You can't specify target table 'xxx' for update in FROM clause

2.通过视图来形成中间表
第三篇 You can't specify target table 'xxx' for update in FROM clause
因为我的这张表本来就存在视图,所以我是采用将表改为视图的方法,原理其实一样

相关文章:

  • 2021-09-12
  • 2021-06-28
  • 2021-06-20
  • 2021-07-01
  • 2021-06-14
  • 2021-07-08
猜你喜欢
  • 2022-12-23
  • 2021-11-07
  • 2021-12-30
  • 2022-12-23
  • 2022-01-12
  • 2021-05-20
  • 2021-10-24
相关资源
相似解决方案