There are three types of joins in SQL: Inner Joins, Outer Joins, and Cross Joins:
- Inner joins return all the rows from both tables that have matching values in their corresponding columns. For example, if we have a table with city names and another table with country names, an inner join would return all the rows from both tables where the city name is equal to the country name.
- Outer joins return all the rows from one table that exist in the other table - for example, if we have a table of cities and another table of countries. An outer join would return all the cities that exist in any country.
- Cross joins (JOIN) return all rows from one or more tables
Share a personalized message with your friends.