SQL: Beginner Guide to Joins
a thread...
a thread...
Join is used to fetch results from related database tables.
Tables are related to each other using a key i.e. Primary, Foreign key, etc.
There’re 4 types of Join:
1. Inner Join
2. Left Join
3. Right Join
4. Full Join
Tables are related to each other using a key i.e. Primary, Foreign key, etc.
There’re 4 types of Join:
1. Inner Join
2. Left Join
3. Right Join
4. Full Join
Inner Join:
Only matching data from both tables will be fetched in this join.
Left Join:
Matching data from both tables and all unmatched records from the Left side table will be fetched.
Only matching data from both tables will be fetched in this join.
Left Join:
Matching data from both tables and all unmatched records from the Left side table will be fetched.
Conclusion:
Out of all the four Joins, most common one which you will use is the inner join. So make sure you understand that better.
Least one which you will use is Outer Join.
But yes from SQL interview perspective it's advisable to know basics of all the Joins.
Out of all the four Joins, most common one which you will use is the inner join. So make sure you understand that better.
Least one which you will use is Outer Join.
But yes from SQL interview perspective it's advisable to know basics of all the Joins.
That's it for now!
If you like this then you might also like reading my previous thread on git:
If you like this then you might also like reading my previous thread on git:
Thanks for Reading.
Namaste, I'm Vikas!
Every Mon, Wed & Fri - I write threads on
Java, Javascript & Fullstack Development.
To read all my future threads follow @vikasrajputin
Any Query or Suggestions?
Put them in the comments below!
Happy Friday :)
Namaste, I'm Vikas!
Every Mon, Wed & Fri - I write threads on
Java, Javascript & Fullstack Development.
To read all my future threads follow @vikasrajputin
Any Query or Suggestions?
Put them in the comments below!
Happy Friday :)
** Correction **
Don't know why I've not paid attention to my Join Diagram.
Thanks to @mcmanamynf for pointing it out.
Sharp readers like him, make me feel good about my content and my readers.
Below is the correct join diagram:
Don't know why I've not paid attention to my Join Diagram.
Thanks to @mcmanamynf for pointing it out.
Sharp readers like him, make me feel good about my content and my readers.
Below is the correct join diagram:
جاري تحميل الاقتراحات...