I had interesting conversation with the attendees of the my SQL Server Performance Tuning course.
I was asked if LEFT JOIN can do the same task as RIGHT JOIN by reserving the order of the tables in join, why does RIGHT JOIN exists?
The definitions are as following:
Left Join – select all the records from the LEFT table and then pick up any matching records from the RIGHT table
Right Join – select all the records from the RIGHT table and then pick up any matching records from the LEFT table
Most of us read from LEFT to RIGHT so we are using LEFT join. Do you have any explaination why RIGHT JOIN exists or can you come up with example, where RIGHT JOIN is absolutely required and the task can not be achieved with LEFT JOIN.
Reference: Pinal Dave (https://blog.sqlauthority.com)