执行顺序依次向下:
insert into temptable(p0)select c5 from temp_user a having count(c5) > 1 group by c5;select count(a.c5) from temp_user a where a.c5 not in (select it.p0 from temptable it where it.p0 is not null);select count(distinct a.c5) from temp_user a where a.c5 not in (select it.p0 from temptable it where it.p0 is not null);为什么后面的两条查询语句返回结果不一样?
求高手帮助!
insert into temptable(p0)select c5 from temp_user a having count(c5) > 1 group by c5;select count(a.c5) from temp_user a where a.c5 not in (select it.p0 from temptable it where it.p0 is not null);select count(distinct a.c5) from temp_user a where a.c5 not in (select it.p0 from temptable it where it.p0 is not null);为什么后面的两条查询语句返回结果不一样?
求高手帮助!
解决方案 »
- 横表转竖表的问题
- error while loading shared libraries: libsqlora8-2.3.so.0
- 关于oracle的安装时内存的需求
- 游标的loop循环可以嵌套吗?
- 求Oracle中的对应操作:在SqlServer中把一个bigint型的字段设为“标识”
- OracleOraHome81ManagementServer 总是启动失败了
- 看看这几道题是不是你想象中那么简单,先做出来先给分
- 急!在redhat linux8下安装 oracle9i出现 Error loading native library: libnjni9.so.怎么办呢??
- sql sever 2000中的数据表导到oracle 9i中,怎么不行?
- 请问我在触发器里如何统计表的行数?
- 求助!关于ora-00903,表名无效
- 存储过程 sys_refcursor参数
这个没报错?
如果你temp_user的c5列本来就不为空的,那么你后面两个SQL语句查询出来的结果应该是一样的才对!出现这种结果不一样的问题,一定是C5列有空值! 如果不为空,结果肯定一样!有可能你在执行了第一句SQL后,别的session向temp_user的c5列插入了空值。你再看看。