I have 2 tables, table one contains phone numbers and owner name, and table two have phone , name and also its have city and street. the problem in table two is that the owner name is the name of the one who pays for the phone number and not the actual owner (for example if my dad pays for my phone number, his name will appear along side my number). what i want to do is to write a query that checks if the phone number exists on both tables and if it does, i want to see the owner name from table one and the other info from table two.
also if there is a number that exists only on table two i want to see it to. and if the number is only on table one i want to see it also but with the address and city column empty.
example for expected result:
i have no idea how to do this, it will be very helpful if someone could tell me where to look for answer.