select count(*) from po.t_po_partmt t
where t.invoiceno not in (select a.invoiceno from po.t_po_accpart a )
當然是0了,自己不在自己中的,當然是0
where t.invoiceno not in (select a.invoiceno from po.t_po_accpart a )
當然是0了,自己不在自己中的,當然是0
解决方案 »
- ORACLE ORA-12569:TNS:包校验和失败
- 关于随机时间 插入的问题。
- Oracle 存储过程嵌套问题??
- 关于oracle备份与恢复问题
- 用plsql编辑表数据的时候,弹出一个对话框,提示dynamic table 什么的错误???在线等...
- 为什么提示 字符到数字的转换错误?
- 高分求ORACLE9i初学者指南pdf!
- 有问题呀
- ORACLE菜鸟问题, 大家请进!!!HELP 再线等待
- OGG-00139 Extract was not built with VAM functionality included.
- 求IBM/AIX下双机备份下的Oracle安装方法策略???
- 如何在已存在的列上增加主键、外键
select count(*) from po.t_po_partmt t
where t.invoiceno not in
(select a.invoiceno from po.t_po_accpart a where t.invoiceno=a.invoiceno)
但還是沒有什么奇怪的地方啊。
select count(*) from po.t_po_partmt t
where t.invoiceno in (select a.invoiceno from po.t_po_accpart a)
结果是666.
表名:t交a的記錄為666條select count(*) from po.t_po_partmt t
where t.invoiceno not in
(select a.invoiceno from po.t_po_accpart a where t.invoiceno=a.invoiceno)
结果是248
表名:t不在t交a中的記錄為248select count(*) from po.t_po_partmt t
where t.invoiceno not in (select a.invoiceno from po.t_po_accpart a )
則是:t不在a中的記錄為0條-->t的所有記錄都在a中
是很奇怪,應該是248條才對。
select count(*) from po.t_po_partmt t
where t.invoiceno not in (select a.invoiceno from po.t_po_accpart a )
这个想应该要返回的不是0是248,但是就是返回0。
如果这样是返回248。
select distinct t.invoiceno from po.t_po_partmt t
minus
select distinct t.invoiceno from po.t_po_partmt t, po.t_po_accpart a
where t.invoiceno=a.invoiceno
最上面的写到底错在哪里了呢
其他的高手们也出来啊,不要沉默啊!
这个能不能加快