2012-06-28 28 views

回答

2
select * 
from tbl_company_info c 
where not exists 
     (
     select * 
     from tbl_posting_job_info j 
     where j.company_id = c.company_id 
       and j.status = 'active' 
     ) 
+0

哪裏是'主動deactive'值filteration ...? –

+0

錯過了,現在添加回答 – Andomar

+0

不知何故,它的工作原理..我會讓它爲我的需求進一步工作..謝謝 –

0
select * 
from tbl_company_info a 
where Isnull((
     select count(*) 
     from tbl_posting_job_info b 
     where a.company_id = b.company_id 
       and a.status = 'active' 
     ),0) = 0