This video saved me. You explained this better than a text book, 15 minutes video, and a lecture from my prof combined did. Thank you
@DatabaseStar3 жыл бұрын
Glad it helped!
@bhumikalamba1862 жыл бұрын
Thanks for the lucid explanation. Summary: 1. SELECT columns to show from the first table 2. (INNER/OUTER) JOIN to the second table 3. add the columns to join ON 4. add any additional columns to step 1. 5. (INNER/OUTER) JOIN to third table 6.add the columns to join ON . The columns can belong to the first/second table and then join it with the column for the third table 7. add any additional columns to step 1.
@DatabaseStar2 жыл бұрын
Thanks for the summary!
@szilardfineascovasa6144 Жыл бұрын
Good man, good man...
@bebe4235 Жыл бұрын
hours upon hours of trying to figure this stuff out and your short video was all i needed. wish I could have found it sooner. THANKS!!
@DatabaseStar Жыл бұрын
Glad you found it helpful!
@jeanettemartinez8 Жыл бұрын
Me too!
@jeanettemartinez8 Жыл бұрын
Thank you! I have watched so many videos where I get completely lost. I was able to follow along in the order and understand how! I really appreciate you and the method you teach.
@DatabaseStar Жыл бұрын
Thanks! Glad it helped you understand it.
@BensLab2 жыл бұрын
Thank You! I've been banging my head against a wall trying to figure this out. This video finally helped me. Many many thanks!
@DatabaseStar2 жыл бұрын
Glad it helped!
@kalenwilson33192 жыл бұрын
I have been trying to make sense of joins for the past 4 weeks - but the very essence of it had eluded me. NOW I understand! Thank you for simplifying this to the point where even I could understand it!
@DatabaseStar2 жыл бұрын
Thanks! I'm glad you found it useful and are able to understand it!
@joadhra9 ай бұрын
Thank you so much! Just 2 words, "Amazing Explanation"
@DatabaseStar9 ай бұрын
Thanks a lot!
@vanpham46912 жыл бұрын
Extremely easy to understand. Thank you so much for this!!!!
@DatabaseStar2 жыл бұрын
Thanks, glad you liked it!
@damisohutchinson18323 жыл бұрын
Ive been rattling my brain for over an hour...to do what you did in 4:05....thank you
@DatabaseStar3 жыл бұрын
I'm glad it has helped!
@petecarroll78072 жыл бұрын
Thank you sir, could not have finished my MySQL project without. Thank you!!!!!!!!!
@DatabaseStar2 жыл бұрын
Glad it helped!
@hashanhemachandra48322 жыл бұрын
Thanks so much! This saved me! Love from Sri Lanka
@DatabaseStar2 жыл бұрын
Glad it helped!
@NOLONGERANONYMOUS2 жыл бұрын
Needed to turn a setting off on certain records in one table based off of a category stored in another table. I'm just beginning to learn SQL for my job and this helped!
@DatabaseStar2 жыл бұрын
Glad it helped!
@caryharris23582 жыл бұрын
Saved my life with this one
@DatabaseStar2 жыл бұрын
Great to hear!
@akutiaakuti36088 ай бұрын
Clear and simple presentation, thank you very much
@DatabaseStar8 ай бұрын
You are welcome!
@Jorhanny33 Жыл бұрын
You are a life saver, I am assuming this can be applied for even more than 3 tables, I definitely need to master MySQL for college projects, tysm.
@DatabaseStar Жыл бұрын
Thanks! Yes you can use the same process for as many tables as you need.
@zabialy29192 жыл бұрын
Great video, still very relevant after 2 years!
@DatabaseStar2 жыл бұрын
Glad it was helpful!
@aiasaiascon3894Ай бұрын
In general - is it a more preferable method to add columns from the JOINs on a step by step pace ? And while following these steps, do you use a notepad (e.g) to write temporarily some parts of the SQL query ?
@DatabaseStar26 күн бұрын
Good questions! I think you should do whatever is easiest for you. I generally add the tables in the FROM clause first, then add the columns I want to see, because my SQL editor will usually show the available columns after I add the table to the query. I don't use a notepad to write parts of the query, but I often write my query in stages in the same SQL file.
@kirillzlobin71355 күн бұрын
This channel is amazing
@DatabaseStar20 сағат бұрын
Thanks!
@The.Wellerman2 жыл бұрын
Thank you thank you! This helped me with a project for school. Thank you a ton!
@DatabaseStar2 жыл бұрын
Awesome! Glad it helped.
@The.Wellerman2 жыл бұрын
@@DatabaseStar I ended up passing the project. Again, thank you.
@redlobsta12 жыл бұрын
it would be great if you could include what the tables originally looked like and how they look after each statement.
@DatabaseStar2 жыл бұрын
Thanks for the feedback! I’ll keep that in mind for future videos. I’ll see if I can add something for this to the Description area.
@elisamutiofficial2245 Жыл бұрын
i enjoyed the video.thank you dad
@DatabaseStar Жыл бұрын
Thanks!
@sgr7ss Жыл бұрын
Great explanation
@DatabaseStar Жыл бұрын
Glad it was helpful!
@cfurnell63383 жыл бұрын
Thanks looks so easy now, well explained
@DatabaseStar3 жыл бұрын
Thanks!
@hassanpatel36302 жыл бұрын
I’m using SQL management server and I need with the scenario, I have table A, junction table and Table B I need one row for table A and concatenate multiple rows of table b into one row with a comma. I’ve search the hours and can find no clues at all. I’d really appreciate it if you help me out
@DatabaseStar2 жыл бұрын
Hey, I think you would need to use a technique called “string aggregation”. This is done using a function called string_agg in sql server. If you have the right results in separate rows showing for table a and b, you can then use this function to combine rows from table b into one row.
@fy83318 ай бұрын
Excuse me Sir I have a question. So in step 5 and 6, when joining the 3rd table and later specifying the target columns, suppose now I want to join based on the columns on the 2nd table & the 3rd table, not the 1st table & the 3rd table. What decides which join type to use? In this case does the sequence of specifying table names matter? What if there're more than 3 tables? Thank you in advance!
@DatabaseStar8 ай бұрын
Good questions! - When joining the 3rd table, you can join to any column in either the 1st table or 2nd table. It depends on how you write the query and add the columns and what makes sense for your data. - The results that you need will determine the join type to use. I see either an INNER JOIN or LEFT JOIN most commonly, depending on whether you want to see rows that have matches or not. - The sequence that you specify the tables will not matter for an INNER JOIN, but it will matter for a LEFT JOIN and RIGHT JOIN. - If there are more than 3 tables, you repeat the process: join to table 4, then specify the join condition to either table 1, 2, or 3.
@fy83318 ай бұрын
@@DatabaseStar Thank you Sir for your answers, it makes sense! And thank u for your prompt reply!
@SZU1881 Жыл бұрын
Fantastic! Thank you!
@DatabaseStar Жыл бұрын
You’re welcome!
@saucegayuchiha88163 жыл бұрын
How to add table with different column name
@DatabaseStar3 жыл бұрын
You should be able to use the same process. You can specify the column name in the ON clause of the join. For example, if table 2 has a column called some_other_id: JOIN table2 ON table1.id = table2.some_other_id
@skeeterstudies81092 жыл бұрын
Please I did some but data do not display in the table
@DatabaseStar2 жыл бұрын
It could be because there is no matches based on your join criteria
@skeeterstudies81092 жыл бұрын
@@DatabaseStar thank you very much, it is now working
@devplus71313 жыл бұрын
Thanks, very easy to understand. :D
@DatabaseStar3 жыл бұрын
Glad it helped!
@patyue50124 жыл бұрын
Thanks for the illustrated example
@DatabaseStar4 жыл бұрын
Glad you like it!
@liatarachel3 жыл бұрын
Really specific and helpful,thank you
@DatabaseStar3 жыл бұрын
Glad it was helpful!
@deesee3622 Жыл бұрын
is language id the same number as publisher id in your example??
@DatabaseStar Жыл бұрын
No, in this example they are different fields.
@deesee3622 Жыл бұрын
@@DatabaseStar so how are they equal to each other if they are not the same number type?
@applikai3 жыл бұрын
The diagram at the beginning of the table is misleading. It shows it as A join B, B join C and A join C. The query however is just two joins, A join B, A join C. I was expecting the video to be dealing with a circular join. Thank you and keep them good videos on complex data modeling concepts coming.
@DatabaseStar3 жыл бұрын
That's a good point! I can update the thumbnail to make it clearer (I don't think I can update the video), but this is good to know.
@ashfaqmahmud2 жыл бұрын
thanks a lot ❤️
@DatabaseStar2 жыл бұрын
You’re welcome!
@lilbandit19793 жыл бұрын
Thank you, thank you, thank you!!! Very clear!
@DatabaseStar3 жыл бұрын
Glad it was helpful!
@darcyyun61222 жыл бұрын
Very helpful, thankyouuuu
@DatabaseStar2 жыл бұрын
Glad it was helpful!
@jakebrown18792 жыл бұрын
I learned something new
@DatabaseStar2 жыл бұрын
That’s great to hear!
@velinandreev1733 жыл бұрын
Lifesaver thank you sooooo much
@DatabaseStar3 жыл бұрын
Glad you found it helpful!
@victorwestmann3 жыл бұрын
Is this standard SQL, PL/SQL or T-SQL? Or it does not matter? :-) Thanks for the video! I just failed an interview with this EXACT question. Feeling awful. But life goes on!
@DatabaseStar3 жыл бұрын
This is standard SQL. The inner join, left join, and right join are all part of the SQL standard. There are some extra join features in specific database types, but I don't think I mentioned any of them in this video.
@sunstryder Жыл бұрын
Mate I wish I had this back in uni.
@DatabaseStar Жыл бұрын
Thanks! Yeah me too, I’m glad it’s helping many people.
@gauravsrivastava177 ай бұрын
Steps make it so easier Step 5
@DatabaseStar7 ай бұрын
That's true!
@Sokratesin_Çaybardağı2 жыл бұрын
thanks to your video
@DatabaseStar2 жыл бұрын
Glad you found it useful!
@alwaysbehappy13374 жыл бұрын
It really helpful. Thanks
@DatabaseStar3 жыл бұрын
Glad it was helpful!
@omarto74142 жыл бұрын
Thank you!
@DatabaseStar2 жыл бұрын
You're welcome!
@AM-HillsideWorks10 ай бұрын
Thank u 👍
@DatabaseStar10 ай бұрын
You’re welcome!
@rapo107 Жыл бұрын
Hello sir... Thanks for making this video. Result will get change if order of the tables changes? Pls reply. 🙏
@DatabaseStar Жыл бұрын
Thanks! No, the result should stay the same if you are using an Inner Join. If you're using an outer join (e.g. left join or right join) then yes the result will change.
@rapo107 Жыл бұрын
@@DatabaseStar.. Thank you sir.
@camilomezu50083 жыл бұрын
THANK YOU SO MUCH!
@DatabaseStar3 жыл бұрын
Glad it helped!
@wendya23093 жыл бұрын
hm, I am getting "ambiguous column name" error.
@DatabaseStar3 жыл бұрын
Ah that’s because the column name exists in more than one table and the database does not know which column you want. If you add the table name and a . Before the column it should work. Eg customer.firstname instead of just firstname.
@wendya23093 жыл бұрын
That worked! Thanks for responding and clarifying!
@sukumarpadhi84262 жыл бұрын
How about show the result in a final form? Your title says with example. However no example....
@DatabaseStar2 жыл бұрын
The final result is shown from about 3:16 where the query has fields from three different tables, which is the example. Were you looking for something else?\
@OBERE_11 ай бұрын
Like how can i get my tittle
@Moccalocca100 Жыл бұрын
This query wouldnt work lol
@DatabaseStar Жыл бұрын
Oh, what error are you getting?
@X-Agn2 жыл бұрын
Lol show inner with left join . Don't show easy one
@DatabaseStar2 жыл бұрын
Good point. Left join would be the same query with Left instead of Inner. But the results would be different