0
tbl_posting_job_info
獲取公司所有未激活的工作
tbl_company_info
company_id companyname
---------------------------
1 XYZ
4 PQR
8 LMN
現在我想這沒有連一個「積極的」作業的公司的信息。
tbl_posting_job_info
獲取公司所有未激活的工作
tbl_company_info
company_id companyname
---------------------------
1 XYZ
4 PQR
8 LMN
現在我想這沒有連一個「積極的」作業的公司的信息。
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'
)
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
哪裏是'主動deactive'值filteration ...? –
錯過了,現在添加回答 – Andomar
不知何故,它的工作原理..我會讓它爲我的需求進一步工作..謝謝 –