奇怪的问题,MINUS运算的结果和预想的不一致。 原因可能是因为TEMP_TABLE中有重复的NUM_COL=50的记录。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 怎么会是2呢SQL> select * from temp_table; NUM_COL---------- 50 50 50 40SQL> select * from temp_table1; NUM_COL---------- 40SQL> select * from temp_table 2 minus 3 select * from temp_table1; NUM_COL---------- 50SQL> select count(*) from 2 (select * from temp_table 3 minus 4 select * from temp_table1); COUNT(*)---------- 1SQL> insert into temp_table1 values('50');已创建 1 行。SQL> select * from temp_table1; NUM_COL---------- 40 50SQL> select * from temp_table 2 minus 3 select * from temp_table1;未选定行 我明白了,是有一个Num_col等于50的重复记录,是我看错了,我以为剩下的两个是重复记录(但实际上不是)。谢谢两位的帮忙。 oracle 数据库闪回 in+Count某字段的时候如何把结果行补零? 关于PLSQL中使用DB_LINK写表,速度很慢--请教 oracle重装的问题 麻烦哪位大虾帮我修正个新建触发器的PL/SQL语句 Clob对象的使用异常,大家指点一下...... 关于where条件中的条件判断,麻烦各位大哥看下 存储过程报错 如何解決此問題? 想问一下,(+)是什么意思?? ORA-01002: 读取违反顺序,为何 developer总怎么样是实现按一个回车就触发!!!
----------
50
50
50
40
SQL> select * from temp_table1; NUM_COL
----------
40
SQL> select * from temp_table
2 minus
3 select * from temp_table1; NUM_COL
----------
50
SQL> select count(*) from
2 (select * from temp_table
3 minus
4 select * from temp_table1); COUNT(*)
----------
1
SQL> insert into temp_table1 values('50');已创建 1 行。SQL> select * from temp_table1; NUM_COL
----------
40
50SQL> select * from temp_table
2 minus
3 select * from temp_table1;未选定行
谢谢两位的帮忙。