I just want to retrieve that id 's from page_content which do not have any entry in clause2 table.
Then select distinct(p.crawled_page_id) from page_content p where NOT EXISTS (select 1 from clause2 c where c.source_id = p.crawled_page_id); is correct query.
I can't understand how select 1 from clause2 c where c.source_id = p.crawled_page_id works too, i get my output .