We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- SQL
- Basic Join
- African Cities
- Discussions
African Cities
African Cities
+ 0 comments select a.name from city as a inner join country as b where a.countrycode = b.code AND b.continent = 'Africa';
+ 0 comments select CITY.NAME from CITY inner join COUNTRY on CITY.COUNTRYCODE=COUNTRY.CODE where CONTINENT="Africa";
+ 0 comments SELECT distinct(CITY.NAME) FROM CITY INNER JOIN COUNTRY on CITY.COUNTRYCODE = COUNTRY.CODE WHERE COUNTRY.CONTINENT="Africa";
+ 0 comments INNER JOIN METHOD
SELECT CITY.NAME FROM CITY INNER JOIN COUNTRY ON CITY.COUNTRYCODE=COUNTRY.CODE WHERE COUNTRY.CONTINENT="AFRICA";
WITHOUT INNER JOIN METHOD
SELECT CITY.NAME FROM CITY,COUNTRY WHERE CITY.COUNTRYCODE=COUNTRY.CODE AND COUNTRY.CONTINENT="AFRICA";
+ 1 comment Works in MySql:
select city.name from city, country where city.countrycode = country.code and country.continent='africa';
or,
select city.name from city inner join country on city.countrycode = country.code where country.continent='africa';
Load more conversations
Sort 772 Discussions, By:
Please Login in order to post a comment