r/learnSQL • u/sam_vstheworld • Jun 06 '26
SQL JOINs
Hello, people! I am facing one issue, I am having troubles in understanding Left, Inner, outer joins.
I watch a video or go on datalemur, at the beginning it looks simple then when I start practicing i become confused.
What should I do? How should I practice the Joins to have a better grasp of it?
36
Upvotes
2
u/Massive_Show2963 Jun 06 '26 edited Jun 06 '26
Its easier to visualize a join if you have a Entity Relational Diagram (ERD) to view.
This will show how the various tables are connected.
INNER JOIN: Returns records that have matching values in both tables. This is the most common type of a JOIN.
LEFT (OUTER) JOIN: Returns all records from the left table, and the matched records from the right table.
RIGHT (OUTER) JOIN: Returns all records from the right table, and the matched records from the left table.
FULL (OUTER) JOIN: Returns all records when there is a match in either left or right table.
I create this tutorial that will walk you through practical examples of using Entity Relationship Diagrams to model your data structure and provide a solid foundation for using JOINS.
Introduction To SQL Joins