This short guide explains how to use the different types of SQL join
Joins are used to link two tables from the same database. There are four types of joins, each unique and as useful as one another
This includes inner join, full outer join, left join and right join
This tutorial presents joins in an easy to understand style
Inner joins can be used to show everything in the 2 tables entered that match, else they will not be shown.
These can be useful to get important information across tables all in one place, like an ID number, a name and a salary.
Full outer joins can be used to show everything across two tables no matter if the headings cross over, any information not inside one of the tables will be declared NULL.
This can be useful because it could show that important data is missing which may be necessary. For example, you may have an employee ID number and a name in one table and wages in another and you will be able to tell if anything is missing when NULL appears.
These can be used to show everything in the left table (the first one entered into you SQL query) regardless of what’s in the right table (the second one entered into you SQL query).
This can be useful when this can be useful as it shows all in the left table and if it isn’t in the right is classified NULL.
This may help as you can see what is needed for the right table to fill it all out.
These can be used to show everything in the right table (the second one entered into you SQL query) regardless of what’s in the left table (the first one entered into you SQL query).
This can be useful when this can be useful as it shows all in the right table and if it isn’t in the left is classified NULL.
This may help as you can see what is needed for the left table to fill it all out.
Sign up to hear more tips
Copyright © 2022 Select Distinct Limited - All Rights Reserved.