SQL JOINS EASY EXPLANATION | BEGINNERS
JOIN EXPLANATION \n\nLeft Join -> inner join + take the value from left join which are not matching with right join\n\nExplanation \n\n# Table \n\nPERSON1  \n  
# JOIN EXPLANATION \n\nLeft Join -> inner join + take the value from left join which are not matching with right join\n\nExplanation \n\n# Table \n\nPERSON1  \n  2\n  3\n  1\n\nPERSON2\n  2\n  2\n  1      \n\n\n# INNER JOIN \n\n 1. Look at the above table PERSON1 ,take the first row value is 2 , it will look for value 2 in PERSON2 table\n 2. we can find two rows in PERSON2 having value 2 so in the NEWTABLE(this means combained inner join table) insert the value 2 twice\n\n\t                               NEWTABLE\n                                     2\n                                     2\n\n 3. Again move to next row in PERSON1 take the Value 3 and check weather three is present in PERSON2,finally its not present,so no insertion\n 4. Then move to the next row in PERSON1 take the value 1 and check for match in PERSON2, yes last row in PERSON2 is matched,so insert the value 1 in NEWTABLE\n\n\t                               NEWTABLE\n                                     2\n                                     2\n                                     1\n\n\n5.our inner Join is ready.\n\n# LEFT JOIN\n\n1.Here after doing inner join take the new table and here person 1 is left table so add the value which are left in PERSON1 table ie) we left 3 because it is not matching, so insert 3 here\n\n                                NEWTABLE\n                                     2\n                                     2\n                                     1\n                                     3\n\n# RIGHT JOIN \n\n Vice versa of left join ie) inner join + right table values which are not matching  with left table\n\n# COMMENT THE NEWTABLE FOR RIGHT JOIN ! THANK YOU\n\n# CODE\nselect firstName,lastName,city,state from Person t1 left join Address t2 on t1.personId = t2.personId;\n```
['MySQL']