ELI5: what is a inner join in sql
// explanation
What is an INNER JOIN?
An INNER JOIN is like matching two puzzle pieces together [1]. You have information in two different tables, and you want to combine them by finding rows that match each other based on something they have in common [1].
How does matching work?
Imagine you have a list of kids and a list of their favorite toys, but they're on separate papers [1]. An INNER JOIN finds the kids whose names appear on both lists and puts their information together on one new paper [1].
What happens to unmatched information?
If a kid's name is only on the toy list but not the kid list, that information gets thrown away [1]. The INNER JOIN only keeps the matches where both tables have the information [1].
When do you use it?
You use INNER JOIN when you only care about the information that exists in both tables, like finding customers who actually made purchases [1].
// sources
Jun 26, 2024 ... INNER JOIN is basically a way to find and combine information from two tables by matching up rows based on what they have in common. I think you ...
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, ...
Jun 22, 2023 ... In an INNER JOIN you get to choose which columns are included. If the column(s) you specify exists in both tables, you need to specify which ...
Jul 21, 2009 ... Outer joins are more expensive than inner joins. What I am about to say is going to be controversial to many. If you tune the database right ...
Sep 30, 2019 ... I originally had an outer join pointing towards the BNKA US table (from the SWIFT table), but my teacher told me an inner join would be better and I don't ...
Video by Bro Code

Video by Socratica

Video by Database Star
