A brief reminder on the different types of SQL JOINS
See https://www.w3schools.com/sql/sql_join.asp
The basic format is;
SELECT column_name(s)
FROM table1
JOIN table2
ON table1.column_name = table2.column_name;
A personal point of note is that, it doesn't matter what the SELECT columns are, it is the ON that dictates the relationship between the two tables to be JOINed.
So a
SELECT *
FROM table1
JOIN table2
ON table1.column_name = table2.column_name;
will return all columns from both tables where table1.column_name = table2.column_name;
No comments:
Post a Comment
Note: only a member of this blog may post a comment.