SQL Joins: A Guide and Examples

  Рет қаралды 29,798

Database Star

Database Star

Күн бұрын

Пікірлер: 39
@DatabaseStar
@DatabaseStar Ай бұрын
Want to easily remember the SQL commands for your database? Get my free SQL Cheat Sheets here: databasestar.mykajabi.com/lpkj-sql-cheat-sheets/?
@anjumshaikh7735
@anjumshaikh7735 Жыл бұрын
I just love the way you break down the hardest topics & concepts so clear , easy to understand with simple examples . Thank you so much. ❤❤❤❤
@DatabaseStar
@DatabaseStar Жыл бұрын
Thanks! I’m glad you enjoyed the video and we’re able to understand the concepts from it.
@obscuredbyclouds1209
@obscuredbyclouds1209 Жыл бұрын
Extra thanks for the subtitles! Even if I don't have a listening issue, they help understanding better
@DatabaseStar
@DatabaseStar Жыл бұрын
Thanks! Glad to hear they are helpful for you.
@RainNColer
@RainNColer Жыл бұрын
Damn im learning selftaught full stack development and already learned MERN stack but felt the need to learn SQL, and im loving it, this channel is so crystal clear with all the topics that i encounter when practicing with my project and want to learn. A great thing about SQL is that is an ancient concept and will prevail even longer so all this information will be valuable for years to come :)
@DatabaseStar
@DatabaseStar Жыл бұрын
Thanks for the kind words, and I'm glad to hear my videos are helpful. Yeah, SQL has been around for a while and the fundamentals don't change.
@aiasaiascon3894
@aiasaiascon3894 Ай бұрын
most intriguing was the use of WHERE clause to write a JOIN, and most of the useful was the LEFT vs RIGHT (that are the same but with different positions of the tables related). Thanks.
@DatabaseStar
@DatabaseStar Ай бұрын
Glad you found the video useful!
@sambarjunk
@sambarjunk 2 жыл бұрын
Clear and to the point
@DatabaseStar
@DatabaseStar 2 жыл бұрын
Thanks!
@ladyzavi
@ladyzavi Жыл бұрын
This video was so helpful. Thank you!
@DatabaseStar
@DatabaseStar Жыл бұрын
Glad it was helpful!
@cime_hime
@cime_hime 29 күн бұрын
thankyou for visualizing this
@DatabaseStar
@DatabaseStar 25 күн бұрын
You're welcome
@surajpatil3579
@surajpatil3579 3 жыл бұрын
Thanks keep making content like this
@DatabaseStar
@DatabaseStar 3 жыл бұрын
Will do! Glad you like it.
@fiennchini
@fiennchini 3 ай бұрын
powerful insights
@DatabaseStar
@DatabaseStar 3 ай бұрын
Thanks!
@thanzeeljalaldeen
@thanzeeljalaldeen 3 жыл бұрын
can we do joins without foreignkey?
@DatabaseStar
@DatabaseStar 3 жыл бұрын
Yes, you can. As long as the fields in both tables represent the same thing, you can do a join and there does not have to be a foreign key created.
@basilisk9864
@basilisk9864 3 жыл бұрын
helpful, keep it up
@DatabaseStar
@DatabaseStar 3 жыл бұрын
Thanks, will do!
@sabuein
@sabuein Жыл бұрын
Thank you.
@DatabaseStar
@DatabaseStar Жыл бұрын
You're welcome!
@milabibik9318
@milabibik9318 Жыл бұрын
Thanks!
@DatabaseStar
@DatabaseStar Жыл бұрын
No problem!
@parko1965
@parko1965 Жыл бұрын
So correct me if I'm wrong these two tables break referential integrity rules, but joins still possible?
@DatabaseStar
@DatabaseStar Жыл бұрын
What about these tables breaks referential integrity rules? In general, you can still join tables if they break rules like that, as long as the data being joined is the same (e.g. both IDs or names or values represent the same thing)
@parko1965
@parko1965 Жыл бұрын
@@DatabaseStar So I can create a record in a child table not related to to a parent table record.
@DatabaseStar
@DatabaseStar Жыл бұрын
Yes, that's right, you can. If you leave the foreign key empty the row will still be inserted. You could put a Not Null constraint on it to prevent that though.
@codewithtae6637
@codewithtae6637 5 ай бұрын
You advised against using the USE keyword because it might break your query if your field name changes. Wont this still be the case if you use the ON keyword to specify field names?
@DatabaseStar
@DatabaseStar 5 ай бұрын
Good question! Yes, if the actual field being joined on is changed in either table (such as renamed from id to person_id), then the join will break whether you have USING or ON keyords. If the field names are different, then USING won't work. It would have to be changed to an ON keyword.
@himanshuchhikara4918
@himanshuchhikara4918 Жыл бұрын
super awesome
@DatabaseStar
@DatabaseStar Жыл бұрын
Thanks!
@RDL-yw5wy
@RDL-yw5wy 8 ай бұрын
Thank you sorry I didn't find a link of the video that contains join three tables or more
@DatabaseStar
@DatabaseStar 8 ай бұрын
No problem, the link is here: kzbin.info/www/bejne/injXY6uXbKqtrKs
@spyrex3988
@spyrex3988 2 жыл бұрын
can we really join without foreign key -- primary key relation?
@DatabaseStar
@DatabaseStar 2 жыл бұрын
Yeah, you can. You would usually join between PK and FK, but you don't need to have those constraints to make the join work. If both columns represent the same thing then you can join. You can actually join on two columns that have two different sets of data, but your results will not be meaningul.
SQL Join 3 Tables: How-To with Example
4:06
Database Star
Рет қаралды 122 М.
Self Join in SQL
9:09
Database Star
Рет қаралды 49 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Learn SQL Joins
21:39
Decomplexify
Рет қаралды 60 М.
When to Use a Subquery in SQL
8:50
Database Star
Рет қаралды 38 М.
7 Database Design Mistakes to Avoid (With Solutions)
11:29
Database Star
Рет қаралды 94 М.
SQL Joins: Difference Between Inner/Left/Right/Outer Joins
10:52
Database Design - similar records, what to do?
7:53
Database Star
Рет қаралды 3,6 М.
SQL Joins Made VERY SIMPLE!
16:37
Data Wizardry
Рет қаралды 5 М.
SQL Joins Examples |¦| Joins in SQL |¦| SQL Tutorial
11:32
Socratica
Рет қаралды 277 М.
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Anton Putra
Рет қаралды 228 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН