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?
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.
Other Puzzles:
SQL SERVER – Puzzle – Challenge – Error While Converting Money to Decimal
SQL SERVER – Challenge – Puzzle – Usage of FAST Hint
Reference: Pinal Dave (https://blog.sqlauthority.com)