mysql delete from in 报错! 在线等
我有一个sql语句 大概是这样的:delete from tab1 s where s.c=2 and (s.a,s.b) in (select t.a,m.b from tab1 t ,tab2 m where ...)
但是mysql一直报 You can't specify target table 'tab1' for update in from clause ,oracle是可以执行这个语句的,mysql就不行,怎么样改造这个语句呢?谁有好的办法?
or
DELETE s from tab1 s,tab2 t,tab1 m
WHERE s.b=m.b and s.a=t.a and s.c=2
or
delete s from tab1 s inner join tab2 m
on s.b=m.b
inner join tab1 t on s.a=t.a
where s.c=2
delete s from tab1 s inner join (select t.a,m.b from tab1 t ,tab2 m where ...) n on s.a=n.a and s.b=n.b
where s.c=2 搞定了,谢谢WWWWA兄了。
还有WWWWb兄,你俩不是同一个?差点看错了、。
相关问答:
我以前安装了一次,后来卸载了,现在再安装的时候,提示错误:Error 1305.Error reading from file C:DOCUME~1\LOCALS~1\Temp\mysql_server.msi.Verify that the file exists and that you can access it.
可是我找 ......
在安装Java编译器的Eclipse的时候,对环境变量进行了配置,在安装MySQl的时候也要对环境变量进行配置;那么后面的配置会影响前面的Eclipse的配置吗?
请大家多指教~!谢谢!
不会把,我这都装了的 我系统里 还装了 ......
这个视频讲的很详细, 对新手非常有用, 基本上一看就懂
由于太大了(50m, 我只能上传20m), 我上传不了, 只好贴出下载地址
下载地址: http://ftel1.3800hk.com/0807/080720djxnzj.rar
好东西,下个看看
......
echo %~dp0
CD %~dp0
mysqld.exe --defaults-file=..\my.ini --console
pause
大家看看以上bat文件的意思,请大侠给个详细的解释啊。
这是启动mysql服务啊。
echo %~dp0
显示当前bat所在目录名
CD %~dp0
......