with T1(id,colA) as ( select 1, 'X' union all select 1, '...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

with T1(id,colA) as (
  select 1, 'X' union all
  select 1, 'Y' union all
  select 2, 'Z'
  ),
T2(id,colB) as (
  select 1, 'AB' union all
  select 3, 'CD'
)
select *
from T1 left join T2 on T1.id = T2.id

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results