这句话意思是:不能先select再更新(修改)同一个表。

可以再外嵌套多一层,这个问题只有mysql有,mssql和oracle都没有。

# 出错
delete from Person
where Id not in (
  select min(Id) as Id from Person group by Email);
# 正确
delete from Person
where Id not in (
  select Id from (
    select min(Id) as Id from Person group by Email) p);

MYSQL错误:You can't specify target table for update in FROM clause的更多相关文章

  1. mysql中You can’t specify target table for update in FROM clause错误解决方法

    mysql中You can't specify target table for update in FROM clause错误的意思是说,不能先select出同一表中的某些值,再update这个表( ...

  2. MySQL 出现You can't specify target table for update in FROM clause错误解决方法

    MySQL出现You can’t specify target table for update in FROM clause 这个错误的意思是不能在同一个sql语句中,先select同一个表的某些值 ...

  3. Mysql中You can't specify target table for update in FROM clause错误的意思是说,不能先select出同一表中的某些值,再update这个表(在同一语句中)。

    将select出的结果再通过中间表select一遍,这样就规避了错误.注意,这个问题只出现于mysql,mssql和oracle不会出现此问题. mysql中You can't specify tar ...

  4. mysql 出现You can't specify target table for update in FROM clause错误的解决方法

    mysql出现You can’t specify target table for update in FROM clause 这个错误的意思是不能在同一个sql语句中,先select同一个表的某些值 ...

  5. MySQL之You can't specify target table for update in FROM clause解决办法

    这篇文章主要介绍了mysql中You can't specify target table for update in FROM clause错误解决方法,需要的朋友可以参考下 MySQL中You c ...

  6. MYSQL之You can't specify target table for update in FROM clause解决办法

    mysql中You can't specify target table for update in FROM clause错误的意思是说,不能先select出同一表中的某些值,再update这个表( ...

  7. mysql error:You can't specify target table for update in FROM clause

    mysql中You can't specify target table for update in FROM clause错误的意思是说,不能先select出同一表中的某些值,再update这个表( ...

  8. mysql出现You can’t specify target table for update in FROM clause

    在mysql执行下面语句时报错: You can’t specify target table for update in FROM clause UPDATE edu_grade_hgm_1 ' W ...

  9. mysql中You can't specify target table for update in FROM clause

    使用mysql在删除表中重复记录 delete from user where username in (select user name form(select username from user ...

  10. MySQL中You can't specify target table for update in FROM clause一场

    mysql中You can't specify target table <tbl> for update in FROM clause错误的意思是说,不能先select出同一表中的某些值 ...

随机推荐

  1. RouterOS 设定NAT loopback (Hairpin NAT)回流

    In the below network topology a web server behind a router is on private IP address space, and the r ...

  2. [UE4]多播代理

    1. 第一种 DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FReceiveDelegateEvent, FString, Value1, FString, ...

  3. flume系统使用以及与storm的初步整合

      Flume NG的简单使用可以参考介绍文档:http://blog.csdn.net/pelick/article/details/18193527,图片也来源此blog:       下载完fl ...

  4. RmNet,CDC-ECM ,NDIS,RNDIS区别

    RmNet和CDC-ECM区别:更像是两种拨号方式的区别,RmNet获取公网IP,ECD-ECM获取局域网IP. 在高通平台上,rmnet driver 和标准的CDC-ECM是有区别的,rmnet ...

  5. javascript创建对象之函数构造模式和原型模式结合使用(四)

    创建自定义类型的常见方式就是组合使用构造函数模式与原型模式一起使用. 构造函数模式用于定义实例对象的特有的部分(属性和方法),原型模式用于定义共享的部分. 这样最大限度的节省了内存的开销. funct ...

  6. kudu和kudu-impala的安装流程

    安装apache的kudu 第一步:下载rpm包 http://archive.cloudera.com/kudu/redhat/6/x86_64/kudu/5.11.0/RPMS/x86_64/ 第 ...

  7. NOIP考前复习-数制转换,数论模板与文件读写

    数制转换有两种题型,一般一题,分值1.5分. 题型一:R进制转十进制 解法就是:按权展开,但要注意各个位的权,最低位(最右边)的权是0次方,权值为1. 纯整数的情况: (11010110)2 = 1× ...

  8. css实现文本两行或多行文本溢出显示省略号

    word-break: break-all; text-overflow: ellipsis; display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/ -webkit-b ...

  9. 显式锁(四)Lock的等待通知机制Condition

       任意一个Java对象,都拥有一组监视器方法(定义在根类Object上),主要包括:wait( ).wait(long timeout).notify().notifyAll()方法:这些方法与关 ...

  10. Windows系统下Eclipse上搭建Python开发环境

    参考网站:   https://blog.csdn.net/zhangphil/article/details/78962159 1.先安装JDK 和python,参考网站:https://www.c ...