select 'x' from ip_user_count_05 b where a.id_no=b.id_no and a.area_code=b.area_code
这一句是什么意思??就是为了看是否有满足符合条件的记录吗?
给你分析一下你的语句:
首先查询条件,select 'x' from ip_user_count_05 b where a.id_no=b.id_no and a.area_code=b.area_code 肯定是存在的,
所以对每一条纪录,都会delete from ip_temp ,因为条件始终成立!!也就是说你把整个ip_temp
都删除了,结果自己去想。。
这一句是什么意思??就是为了看是否有满足符合条件的记录吗?
给你分析一下你的语句:
首先查询条件,select 'x' from ip_user_count_05 b where a.id_no=b.id_no and a.area_code=b.area_code 肯定是存在的,
所以对每一条纪录,都会delete from ip_temp ,因为条件始终成立!!也就是说你把整个ip_temp
都删除了,结果自己去想。。
解决方案 »
- 帮忙解决crontab定时问题
- 关于Oracle随机查询数据的问题,在线求解,求帮助
- 写个SQl
- 刚在 linux 下装好的 oracle 10 g ,登陆后发现需要验证,验证时出现了以下问题?
- 安装好oracle后,用system进去,老是提示说tns没有监听,怎么回事?在线急~!!!!!!!!!!!!!
- oracle的基础问题
- oracle 9i客户端问题(急急急)
- 想不通还有这样的问题!请来看看!
- 帮忙看个错,ORA-00600
- 查询一个用户建立的所有表,sql语句是什么?
- 急,马上结贴!把sql数据库的表,视图导到oracle..................?
- 两个sql*plus语句问题,怎么解决阿?
where exists(select 1 from ip_user_count_05 b where ( b.id_no, b.area_code ) in ( a.id_no, a.area_code ) )ordelete from ip_temp a
where ( a.id_no, a.area_code ) in (select b.id_no, b.area_code from ip_user_count_05 b )
-----------------------------------
做一下执行分析看看
where exists(select 'x' from ip_user_count_05 b where a.id_no=b.id_no and a.area_code=b.area_code)
是没有响应还是速度慢?