mysql You can't specify target table 'sys_right_menu' for update in FROM clause (不能从Objor子句中指定目标表“SysRyType菜单)
错误语句:
DELETE from sys_right_menu where right_id in (
SELECT m.right_id from sys_right_menu m
LEFT JOIN sys_right r on r.right_id=m.right_id
WHERE r.right_id is null
)
更正后:
DELETE from sys_right_menu where right_id in (
SELECT right_id from (
SELECT m.right_id from sys_right_menu m
LEFT JOIN sys_right r on r.right_id=m.right_id
WHERE r.right_id is null
) a
)
mysql You can't specify target table 'sys_right_menu' for update in FROM clause (不能从Objor子句中指定目标表“SysRyType菜单)的更多相关文章
- Mysql -- You can't specify target table 'address' for update in FROM clause
做地址管理时,需要先根据要设为默认的地址的用户将用户的其他地址都设置为非默认 需要select出用户id然后update 原语句 update address set isdeafult = 0 wh ...
- mysql You can't specify target table 'sys_org_relation' for update in FROM clause 删除表条件不能直接包含该表
mysql中You can't specify target table for update in FROM clause错误的意思是说,不能先select出同一表中的某些值,再update这个表( ...
- mysql You can't specify target table 'xxx' for update in FROM clause的解决
DELETE from sp_goodscontent where goodsId in (SELECT t.goodsId from ( SELECT goodsId FROM sp_goodsco ...
- mysql You can't specify target table 'xxx' for update in FROM clause
含义:您不能在子句中为更新指定目标表'xxx'. 错误描述:删除语句中直接含select,如下: DELETE FROM meriadianannotation WHERE SeriesID IN ( ...
- Mysql You can't specify target table 'newsalrecord' for update in FROM clause
这个问题是不能先select出同一表中的某些值,再update这个表(在同一语句中),即不能依据某字段值做判断再来更新某字段的值.解决办法就是建立个临时的表.
- 1093 - You can't specify target table 'account' for update in FROM clause
目的:查询一张表的相同的两条数据,并删除一条数据. 分析 先查询出相同的数据,然后删除 查询相同的数据 SELECT a.id FROM account a GROUP BY a.username H ...
- mysql中更新或者删除语句中子语句不能操作同一个表You can't specify target table 'test' for update in FROM clause
问题描述:有个数据表test,有个字段value,如下 mysql> select * from test;+----+------------------------------------+ ...
- Mysql update in报错 [Err] 1093 - You can't specify target table 'company_info' for update in FROM clause
Mysql update in报错 解决方案: [Err] 1093 - You can't specify target table 'company_info' for update in FRO ...
- MySQL中执行sql语句错误 Error Code: 1093. You can't specify target table 'car' for update in FROM clause
MySQL中执行sql语句错误 Error Code: 1093. You can't specify target table 'car' for update in FROM clause 201 ...
随机推荐
- JVM-垃圾回收篇
目录 JVM-垃圾回收篇 前言 举个例子 JVM 有哪些垃圾回收算法? 标记-清除算法 复制算法 标记-整理算法 分代收集算法 JVM 有哪些垃圾回收器? 概述 几个相关概念 一:Serial 收集器 ...
- C#开发PACS医学影像处理系统(十七):2D处理之影像旋转和翻转
1.任意角度旋转 在XAML设计器中,设置RotateTransform属性 <InkCanvas x:Name="ToolInkCanvas" UseCustomCurso ...
- h5页面在浏览器上好好的,到手机上熄火了又看不到报错信息怎么办?
背景 最近小编接了一个新需求,用h5开发页面,通过webview嵌入原生APP中,自己在浏览器上开发爽歪歪,什么信息都能看到,可是一嵌入原生app中,瞬间就熄火了,啥也看不到了,不知道为什么,反正就是 ...
- spring boot 源码之SpringApplication
run方法 run方法主要创建和初始化ConfigurableApplicationContext,在各个节点调用SpringApplicationRunListener的回调函数,在发送异常时调用用 ...
- RXJAVA之异步操作
Observable提供了一些do方法来快速提供监听响应事件. doOnComplete 当complete时,执行action. doOnTerminate 当结束执行action,无论是正常还是异 ...
- 10月1日之后,你新建的GitHub库默认分支不叫「master」了
从 2020 年 10 月 1 日开始,GitHub 上的所有新库都将用中性词「main」命名,取代原来的「master」,因为后者是一个容易让人联想到奴隶制的术语. 这个决定并不是最近才做出的.今年 ...
- tkMybatis和Mybatis Generator的结合使用
tkMybatis配置 tkmybatis是基于Mybatis框架开发的一个工具,通过调用它提供的方法实现对单表的数据操作,以免写任何sql语句. tkMybatis通常与Mybatis以及Mybat ...
- 刷题[MRCTF2020]套娃
解题思路 查看源码,发现注释中存在代码 //1st $query = $_SERVER['QUERY_STRING']; if( substr_count($query, '_') !== 0 || ...
- pwnable.kr-cmd2-witeup
程序清除了环境变量,解决对策是使用绝对地址使用各种命令和文件. 程序的过滤策略更加严格,过滤了/.天哪,使用绝对路径必用/,怎么办咩? 解决办法是使用pwd变量,它会显示当前目录,然而在/目录下执行此 ...
- Ubuntu16.04 Nvidia显卡驱动简明安装指南
简单得整理了一下Ubuntu16.04 Nvidia显卡驱动的安装步骤: 查看当前系统显卡参数: sudo lspci | grep -i nvidia 删除之前的驱动: sudo apt-get - ...