日期:2014-05-17  浏览次数:20785 次

请问数据库查询语句(在线等)
我有两个视图。要在第一个视图里面的数据里面是被叫号码,一个是查询里面的号码,现在要在被叫里面查询另一个视图里面没有的号码,怎么用SQL语句查询:select * from d_areacfg这个事总的。。

selcet * from r_c_e_h_20111207 t where call type=‘1’select * from d_areacfg这个是那个被叫的。怎么查询里面的数据在select * from d_areacfg里面缺少的号码。
详细点谢谢


------解决方案--------------------
select * from A where A.号码 not in ( select 号码 from B )
------解决方案--------------------
select * from r_c_e_h_20111207 where t.call_type=‘1’ and cell_number not in
(select t.cell_number 
from 
d_areacfg d 
)

2楼正解~~ 楼主描述可以再清晰一点, a 和 b 都是你的视图