user1700890
user1700890

Reputation: 7742

Join two tables, display values from two table besides joint row

I have Table1 with rows A and B and Table2 with rows C and D.

I would like to join them on column B and C and also display corresponding values in column A and D.

Do not know where to start.

Regards,

Upvotes: 0

Views: 75

Answers (2)

Avdhey
Avdhey

Reputation: 79

Select 
t1.A
,t1.B
,t2.C
,t2.D
FROM
table1 t1
Inner Join
table2 t2
On 
t2.C = t1.B

Upvotes: 0

juergen d
juergen d

Reputation: 204924

select table1.a, table2.d
from table1
join table2 on table1.b = table2.c

Upvotes: 3

Related Questions