I have a nest query as below:
SELECT field1 FROM table1
WHERE field1 NOT IN
( SELECT field2 FROM table2
WHERE field3 = TRUE )
This query run fine as long as the second query ( the inner query ) have return at least one record.
But there is still a case where the second query does not return any record then my nest query will run forever.
Please help me how to fix this query.
SELECT field1 FROM table1
WHERE field1 NOT IN
( SELECT field2 FROM table2
WHERE field3 = TRUE )
This query run fine as long as the second query ( the inner query ) have return at least one record.
But there is still a case where the second query does not return any record then my nest query will run forever.
Please help me how to fix this query.