MySql报错:You can't specify target table 'table name' for upda

hyq82782022-10-04 11:39:541条回答

MySql报错:You can't specify target table 'table name' for update in FROM clause
在Mysql下执行:
delete from blur_article where id not in(select min(id) from blur_article group by title)
用途是去重复标题,但是却报错!
#1093 - You can't specify target table 'blur_article' for update in FROM clause
在Mysql下执行:
select * from blur_article where id not in(select min(id) from blur_article group by title)
执行查询语句却显示成功!
怎么回事呀,如果上面的delete不能执行,有没有别的sql可以做这样的操作?
我是想做一个去重复操作,比如说:
字段 id title
1 张三
2 李四
3 张三
4 王五
5 李四
最终结果是
id title
1 张三
2 李四
4 王五

已提交,审核后显示!提交回复

共1条回复
雁儿066 共回答了20个问题 | 采纳率100%
mysql中不能这么用.(等待mysql升级吧)
错误提示就是说,不能先select出同一表中的某些值,再update这个表(在同一语句中)
替换方案:
create table tmp as select min(id) as col1 from blur_article group by title;
delete from blur_article where id not in (select col1 from tmp);
drop table tmp;
已经测试,尽请使用
1年前

相关推荐

英语翻译1.Please go into more detail to specify the reason of EC
英语翻译
1.Please go into more detail to specify the reason of EC which come from customer or RD,mention the impact on cost...and so on.Attach related document as well.
2.Please sepcify the Model number or Assembly part number which EC impact on
neogui1年前1
haccc 共回答了19个问题 | 采纳率78.9%
1 请对来自于客户或者RD(研发部门)的EC(支出控制)的理由给出细致的描述,包括对于成本的影响,等等.请同时附加相关资料.
2 请给出受EC(支出控制)影响的产品号码或者组配件号码
英语翻译and also tell me when you available to chat ok.specify t
英语翻译
and also tell me when you available to chat ok.specify the time.
我不太看的懂=-=
gnbubz1年前5
suny1226 共回答了22个问题 | 采纳率95.5%
当你有空时要告诉我说OK,并且告诉我什么时候.
species与specify读音区别,为什么e的读音不一样
Maskxq1年前1
在盐碱地 共回答了17个问题 | 采纳率94.1%
species
ˈspi:ʃi:z 这里的e发i(一)音
specify
ˈspesɪfaɪ 这里的e发e(埃)音
所以读音不同
please-specify-number-of-siblings-you-have是什么意思
fengwind1年前3
秋枫秋月 共回答了13个问题 | 采纳率100%
please specify number of siblings you have
请注明你有许多兄弟姐妹
手机提问的朋友在客户端右上角评价点【满意】即可.
Please specify topics of academic interest in areas other th
Please specify topics of academic interest in areas other than those given in 1.
leon10131年前1
花都没开好 共回答了20个问题 | 采纳率95%
Please specify topics of academic interest in areas other than those given in 1.
帮忙翻译一下.要准确
意思大致是:
请指定(设定)学术兴趣话题的范围,该范围有别于1中所列(不能与1中所列重复).
英语翻译Postal regulations specify that a parcel sent by priorit
英语翻译
Postal regulations specify that a parcel sent by priority mail may have a combined length and girth of no more than 108 in,Find the dimensions of a rectangular package that has a square cross section and the largest volume that may be sent cia priority mail .What is the volume of such a package.
Hint:The length plus the girth is 4x+h(see the accompanying figure)
是求题目的意思,
hwei2111年前1
Kevin_R 共回答了22个问题 | 采纳率100%
邮政规则明确规定,以优先邮件寄送的包裹有一个长度与周长之和不超过108英寸的限制.请给出一个满足优先邮件寄送限制,且使容积最大化的,横截面为正方形的包裹尺寸.并寄送这个包裹的容积.
提示:长度加上周长是4x+h(见附图).

分析:
目标函数:Max hx^2
约束条件:4x+h=108
can't find minilyrics,piease specify the minilyrics folder!
老严支持广州队1年前2
查号请拔零 共回答了13个问题 | 采纳率100%
未发现迷你歌词(软件名),请确定迷你歌词的安装文件夹
codeblocks疑问codeblocks中ERROR: You need to specify a debugger
codeblocks疑问
codeblocks中
ERROR: You need to specify a debugger program in the debuggers's settings.
(For MinGW compilers, it's 'gdb.exe' (without the quotes))
(For MSVC compilers, it's 'cdb.exe' (without the quotes))
是什么意思?
南方之秀1年前0
共回答了个问题 | 采纳率
1.Additional Costs like taxes/ duties (Please specify the br
1.Additional Costs like taxes/ duties (Please specify the break up) 2.Total Landed cost
3.Delivery Location
4.Min.Supply Qty for FOB Delivery per lot
5.Bond to Bond Basis to Cabin Stores,Air India,Mumbai
snby1年前2
静土逍遥 共回答了17个问题 | 采纳率94.1%
1、额外的费用,如税费/关税(请列出分项报价)
2、总抵岸价格
3、交付地点
4、每批次最小供应数量(到岸价交付)
5、这个翻译很难,试着翻一下吧:货物运抵仓库后,以债券形式支付(费用),仓库地点:孟买,运输方式:印度航空,空运
英语语法please specify below中 及物动词 specify后面跟的是什么词性的单词 难道及物动词后面可
英语语法please specify below中 及物动词 specify后面跟的是什么词性的单词 难道及物动词后面可以跟介词/副词吗?
损人王1年前1
cici8318 共回答了17个问题 | 采纳率88.2%
specify后可以跟介词...
应为please specify _____
___ 一般都是说在那里进行详细解释..
而below,above,to the right,to the left
都是preposition of sub-location
分位置的介词
inform,specify ,notify ,report的区别以及用法的不同
nahilin1年前1
相对误差 共回答了14个问题 | 采纳率100%
inform 通知,但较notify正规一点
specify 要具体说明的(强调是要具体的)
notify 通知一下(通常是比较简单的知会)
report 是最正规的汇报或报告
英语翻译The Parties intend to specify the condi-tions in which T
英语翻译
The Parties intend to specify the condi-tions in which TCG shall request individ-ual deliveries of the CONTRACTUAL PRODUCTS by issuing individual release orders (the "INDIVIDUAL RELEASE OR-DERS").
sherry531年前1
wssxbc 共回答了20个问题 | 采纳率95%
双方打算在指定条件筹措,其中塔城应要求individ -虚拟交货的合同产品发行个人发布命令( “个人释放或- DERS ” ) .
英语翻译1 只要你纤细说明要我们做些什么,我们会尽力帮你做好一切准备的.(specify,get everything
英语翻译
1 只要你纤细说明要我们做些什么,我们会尽力帮你做好一切准备的.(specify,get everything reday)
2 那人弯腰从地上把书捡起来 (PICK UP)
3 再没有收到他的信,于是我们怀疑他是否还活着.(hear from)
4 只要你永不灰心,就没有战胜不了的困难.(lose heart)
5 到目前为止他们的实验进行的十分顺利,但还有很多问题尚待解决.(to date)
熊猫abc1年前1
望律 共回答了17个问题 | 采纳率100%
As long as you specify what we need to do,we will try our best to get everything ready for you.
That person bent over and picked the book up from the floor/ground.
We hadn't heard from him since,so we doubted that he was still alive.
As long as you don't lose heart,there will no difficulties that you can't conquer.
Their experiment has been going very smoothly to date,but there are still a lot of problems that need to be solved.
LSMW :Unable to Specify Files .Logical path inco
LSMW :Unable to Specify Files .Logical path inco
Hi Guys,I am trying to upload HR Master Data Using the Standard LSMW 0555 program RPUSTD00.When I try to execute the step Specify Files ,system displays an error message "No Logical Path specified."The Source File is in my Local PC .When I click the Converted Data File in the Specify files listI get a popup which asks me for a Logical path and a Logical File and both these parameters a mandatory.I tried to maintain the parameters and entries in transaction FILE also.But it says 'logical path not assigned to the physical directory.'What is the correct method for this.What steps should I follow ..Pls advice
vallen121年前1
wubai1980 共回答了11个问题 | 采纳率100%
Hello Saplinkin,Execute trans FILE and then pick option for logical file name definition,cross-client.For your case you could pick HR_DATASET as your logical file and select GLOBAL_PATH as logical path and then your physical file here has to match whatever converted file name you have in the LSMW.So now just make sure your entries in the LSMW Converted Date File under Specify Files matches the Cross Client customizing table you have updated.
技术文档 谁来帮忙翻译一下-n, --raid-devices= Specify the number of activ
技术文档 谁来帮忙翻译一下
-n, --raid-devices=
Specify the number of active devices in the array. This, plus
the number of spare devices (see below) must equal the number of
component-devices (including "missing" devices) that are listed
on the command line for --create. Setting a value of 1 is prob-
ably a mistake and so requires that --force be specified first.
A value of 1 will then be allowed for linear, multipath, raid0
and raid1. It is never allowed for raid4 or raid5.
This number can only be changed using --grow for RAID1, RAID5
and RAID6 arrays, and only on kernels which provide necessary
support.
大概翻译一下 就行了,其中的 raid0(0-6), RAID(0-6).之类的不用翻译。我现在就是不知道 -n这个选项 怎么用 后面接的是什么。能翻译个大概就OK 其他的我自己就知道是怎么一回事了。
贱招拆招1年前2
3月25日 共回答了22个问题 | 采纳率95.5%
aid-devices酰胺=——
指定数量的有源装置在一个数组.这一点,再加上
备用设备的数量(见下文)的数量必须相等
component-devices设备(包括“丢失”)所列
在命令行中为- - - - - -创造.设置值设为1,是不利于-
犯错误,所以需要巧妙地那——力指定第一.
值设为1,然后将被允许,raid0线性、多路径
和raid1.它是绝对不允许的raid4或raid5.
这个数字能仅仅被改变利用——的增长,RAID5 RAID1
和RAID6阵列,只有在内核提供必要的
支持.
请好兄弟姐妹们给我翻译下下4. Where do I specify the terms for a recurring
请好兄弟姐妹们给我翻译下下
4. Where do I specify the terms for a recurring billing subscription or installment?
In addition to standard product attributes, the terms related to recurring billing subscriptions and installments are defined below.
zxqiong1年前1
nn的猫 共回答了16个问题 | 采纳率100%
我在哪里具体条款为续订付费订阅或分期付款?
除了标准的产品属性,这些词汇相关续订付费订阅和分期付款的定义如下.
问specific specisically specificity specification specify spe
问specific specisically specificity specification specify specifiable special specialize speciality
有什么区别,有些意思都相同的?
twotequila1年前1
我不是妮可 共回答了15个问题 | 采纳率80%
词性不同,
specific[英][spiˈsifik] [美][spɪˈsɪfɪk] adj.明确的;特种的;具体的;[免疫学]特效的n.特效药;特性;细节;显著的性质,特性
specisically adv.特别地;明确地;具体地
specificity n.特异性,特征,种别性;种特性
specification n.规格;详述;说明书
specify vt.指定;详述;提出…的条件;使具有特性vi.明确提出,详细说明
specifiable adj.可指明的,可列举的
special adj.特殊的;专门的;专用的;重要的n.专车;特价;特刊;特约稿
specialize vi.专门从事;专攻;详细说明;特化
vt.使专门化;使适应特殊情况;详细说明;列举
speciality n.专业,专长;特性;特制品;英〉同specialty
统计题(英语),Many random number generators allow users to specify
统计题(英语),
Many random number generators allow users to specify the range of the random numbers to be produced.Supposed that you specify that the random number Y can take any value between 0 and 2.Then the density curve of the outcome has constant height between 0 and 2,and height 0 elsewhere.
(a) Is the random variable Y discrete or continuous?Why?
(b) What is the height of the density curve between 0 and Draw a graph of the density curve.
(c) Use your graph from (b) and the fact that the probability is area under the curve to find P(Y
英文我能看懂——!
181976191年前2
xingfubenmao819 共回答了15个问题 | 采纳率86.7%
这不就是均匀分布么.
连续的,why,用定义解释.因为连续随机变量的定义就是一切可能取值充满区间(a,b),在这个区间内有无穷不可列个实数.
密度函数p(y)=1/2就是height,图就是在y属于(0,2)时候density是一条直线,y在区域外时都是0.
P(Y