shubham sharma
shubham sharma

Reputation: 1

Joining and Disjoining two tables

I have need to join tables using only one common variable but the output i want is such a way that as soon as content of table 1 ends the content of table 2 populates into different column. I am new to SQL would appreciate if someone could help me.

input query

select 
t1.col1, t1.col2 ,t2.col1,t2.col2
from t1 
left join t2
on t1.col1=t2.col1
where t.col1=1224556

desired output

t1.col1 t2.col1 t2.col2 t2.col2

Many thanks in advance!!

Upvotes: 0

Views: 16

Answers (0)

Related Questions