Skip to content
Advertisement

sql join gives cumulative results

I want to join county and county_type tables and get only those county that doesnt have a type =30. From below example id = 1 and 3 should only be the expected output county

output:

Tried this:

what i am getting is cumulative:

Advertisement

Answer

You want not exists:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement