Rajanikant Hawaldar
Can you achieve the same result as LEFT JOIN by using RIGHT JOIN?

Can you achieve the same result as LEFT JOIN by using RIGHT JOIN?

By Rajanikant Hawaldar in SQL Server on Mar 07 2021
  • Kiran Mohanty
    Mar, 2021 8

    Yes and No.

    Why Yes?

    1. If records are well-managed and no null records found in both left and right table, we can replace left join with right one.

    2. If we swap left and right tables, then we can replace left join with right join.

    Why No?

    Obviously we can’t replace, else why we have 2 joins.

    In case of tables with null or not normalized records, we can replace left join with right join, it would end up with different result set.

    • 1
  • Rajeev Kumar
    Mar, 2023 17

    yes. Just switch the table positions and use LEFT JOIN instead of RIGHT JOIN and you get the same result. Even from performance standpoint there should be no difference. We do not really need a RIGHT JOIN.

    • 0
  • Murali Krishnan
    May, 2021 21

    Yes , we can reverse the table to achive the same

    • 0
  • satish kumathalli
    Mar, 2021 8

    Ya we can We can exchange table nameAnd use right join.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS