Reputation: 157
I'm using SQLite to work with my database
I have two different tables, with key columns that have different names but the same value.
As such:
shoes
Identification | Name | Shoe size
1 Bob 10
2 John 12
payment
PaymentID | Price | Year
1 20 2013
2 38 2015
I need
Identification(or PaymentID, no matter) | Name | Shoe size | Price | Year
1 Bob 10 20 2013
2 John 12 38 2015
I've been searching, and trying to understand the tutorials to no avail. I guess im just too stupid
Upvotes: 2
Views: 4885
Reputation: 204904
select s.identification, s.name, s.`shoe size`, p.price, p.year
from shoes s
join payment p on p.paymentid = s.identification
Upvotes: 4