1.

What is difference between left and right join?

Answer»
S.noLEFT JOINRIGHT JOIN
1.It gets the records from the ROWS of the LEFT side linked table and only the matching records from the RIGHT table.It gets the records from the rows of the RIGHT side linked table and only the matching records from the LEFT table.
Also READ: MYSQL Tricky Interview QuestionsExample 1. Left Join

SELECT column_list FROM table_1 LEFT JOIN table_2 ON column_name1 = column_name2 WHERE join_condition

2. Right Join

SELECT column_list FROM table_1 RIGHT JOIN table_2 ON column_name1 = column_name2 WHERE join_condition



Discussion

No Comment Found