高手请进!!!!!关于ORACLE中的sql语句包含NOT EXISTS的问题
本人想找不包含在结果集的中的WAPSNZDB记录
select * from WAPSNZDB where NOT EXISTS(select b.spcode spcode,b.pagecode pagecode from linkmenu a,WAPSNZDB b where a.spcode = b.spcode and a.pagecode = b.pagecode)
打直接运行这个语句时返回的记录总数是1550
select * from linkmenu a,WAPSNZDB b where a.spcode = b.spcode and a.pagecode = b.pagecode
而执行
select * from WAPSNZDB;
返回的结果集的记录总数为1554
请问如果执行下面的语句是不是应该返回的记录总数为4呢?而现在是没有找到任何记录.
select * from WAPSNZDB where NOT EXISTS(select b.spcode spcode,b.pagecode pagecode from linkmenu a,WAPSNZDB b where a.spcode = b.spcode and a.pagecode = b.pagecode)
WAPSNZDB表结构是
mobile,spcode,pagecode
linkmenu表结构是
menuname,spcode,pagecode
我现在就是想打那4条记录给找出来,但是我就是不知道怎么写sql语句,我上面上语句写法对吗?如果不对,应该用什么方法打它能给找出来呢?请教各位高手了!