For Example: I have two tables
table agent
table application
1)
select a.agentID, agent_nm from agent a
left join application ap on (ap.agentID=a.agentID);
I am using Left join in above query and got the result is
2)
select a.agentID, agent_nm from application ap
right join agent a on (ap.agentID=a.agentID);
And i am using Right join in above query and got the same result as i got from using the Left join. like
So my question why are left and right join in mysql. We can retrieve the data with left join only swap the table. So why we are using the right join in our queries. Same way we can achieve target only using the Righ join without using the left join. So what is the reason of Left and Right Join in SQL. Can anyone explain the logic?