Reputation: 1
I have 2 tables in my database, tell
and phone
:
Table tell
:
Table phone
:
I wanted to select id and name and number
Please help me.
Upvotes: 0
Views: 85
Reputation: 84
SELECT t.id, t.name, p.number
FROM tell t
JOIN phone p
ON t.name = p.name
Upvotes: 3
Reputation: 8758
You'll just need to join the two tables together on the name column:
select
t.id,
t1.name,
p.number
from
tell t
inner join
phone p
on t.name = p.name
Upvotes: 3