Two Simple solutions explained in detail for beginners
We can solve this using two ways mentioned below,\neach of them use leftjoin, why? because we need each entry from table 1 the entries from second table can be 
We can solve this using two ways mentioned below,\neach of them use leftjoin, why? because we need each entry from table 1 the entries from second table can be taken as null and that is exactly what left join do.\nIf we use full join, then it would give us the rows that are present in both the tables, while right join will give us all the values from table 2 no matter whether they are present in table 1 or not, like opposite of left join.\n\nMethod 1 using on:-\n```\nselect firstname, lastname, city, state\nfrom person left join address\non person.personid = address.personid\n\n```\non can also be used when the column name is different in both the tables, like \nif personid was named as p_id in address table then we use the below statement\n```\non person.personid=address.p_id\n```\nI hope this is clear.\n\nMethod 2:- \n```\n\nselect firstname, lastname, city, state\nfrom person left join address using (personid);\n```\n\'using\' can only be used when columns from both the table have same name otherwise it won\'t work,\nfor this question this is more better approach because the column name is same.\n\nFeel free to ask anything in the comments.\nIf you found this helpful please upvote.\n
['MySQL']