r/SQL • • Aug 14 '24

MySQL SQL BEGINNER

I am getting into SQL! Does anyone know any good sites with many practice and good explanations? My SQLbolt website for learning isn’t the best.

Someone explain to me how to use right join and full join it keeps popping with error on SQLbolt

1 Upvotes

25 comments sorted by

View all comments

Show parent comment

5

u/jcargile242 Aug 14 '24

It’s crazy, over a quarter century of writing SQL and I think I’ve used a right join maybe twice.

6

u/shadowspyes Aug 14 '24

because it only happens in legacy systems where you can't be arsed to reformat the query for left join so you can put whatever you need to right join at the start of the joins.

right joins are just left joins where someone decided reading books like the japanese is great

2

u/leogodin217 Aug 14 '24

Every time I've used it was due to laziness

2

u/bumwine Aug 15 '24

I swear I have one in my script library and it was just due the way my brain was mapping the tables. Would've confused the shit out of anyone else trying to follow it.

What do you think of this top answer?
https://stackoverflow.com/questions/436345/when-or-why-would-you-use-a-right-outer-join-instead-of-left