I need help forming a query. I have two tables; country and country_restricted
'country' lists all countries on this great earth. 'country_restricted' lists only those countries that we want to restrict for a peticular reason
Here's how the tables are set up:
country:
country_id | country_name
country_restricted:
country_id
I figured out how to query for only the restricted countries, which is like this:
SELECT a.country_id, a.country_name
FROM country a
RIGHT JOIN country_restricted b
ON a.country_id = b.country_id
I want to do a query that will display only those countries from the 'country' table that are not listed in the 'country_restricted' table.
Anyone know how to do this?
'country' lists all countries on this great earth. 'country_restricted' lists only those countries that we want to restrict for a peticular reason
Here's how the tables are set up:
country:
country_id | country_name
country_restricted:
country_id
I figured out how to query for only the restricted countries, which is like this:
SELECT a.country_id, a.country_name
FROM country a
RIGHT JOIN country_restricted b
ON a.country_id = b.country_id
I want to do a query that will display only those countries from the 'country' table that are not listed in the 'country_restricted' table.
Anyone know how to do this?