Hacker News new | ask | show | jobs
by onlyrealcuzzo 2603 days ago
I'm by no means a SQL expert. But I just used a right join a few days ago (for the first time ever).

I thought it made sense to start the SELECT from one table. From there, I could left join to another table, and from that table I could only right join to get what I needed.

I'd love to know, is there another way around that? I know I could have started from a different table, but I think the query makes more sense starting from where I did.

1 comments

Any right join could be written as a left join. What you describe is the use case for a right join - it makes the query more readable.