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
都删除了,结果自己去想。。
解决方案 »
- 用shell命令查程序运行时间
- oracle 试图问题,请高手帮忙,在线等.....
- oracle 列相减问题
- plsqldeveloper 和 toad 中debug 菜单 都是暗化
- 登陆服务器上的数据库,然后向自己客户端写数据怎么弄
- 在ORACLE中用触发器实现主键功能报错!
- 请问:oracle 中select类的存储过程怎么把查询结果(数据集)取出来,谢谢!
- 我编写了一份数据库开发规范的文档,请大家批评指教!提出好的建议的朋友大大送分!
- 简单的JDBC classpath设置的问题 在线等 解决问题后 分不是问题
- 怎样把两列值和起来显示
- 急,马上结贴!把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)
是没有响应还是速度慢?