I have the following issue. I have 2 tables I want to Join "TableALong" and "TableBLong"
TableALong
ID, Name, Store,Age
1, John, Walmart, 5
2, Johnny, Walmart, 8
3, Johnny, Target , 10
4, Bill, Shoppers, 2
5, Joe, Target, 3
TableBLong
ID, Name, Store, StoreAddress
1, John, Walmart, 35353 Address
1, John, Walmart, 53544 Address
2, Johnny, Walmart, 35353 Address
I want to do something like an ALIAS before I join where I have something like:
SELECT A.ID, A.NAME, A.STORE, A.AGE, B.STOREADDRESS
FROM TableALong as A, TableBLong as B
ON A.NAME = B.NAME and A.STORE = B.STORE
This is invalid in oracle. What is the correct query to get this to work in oracle? I assume it is a left join I want? (After the join, there will be multiple rows for each item in TableALong.)