2016-11-24 17 views

答えて

1

あなたはDBMSを指定していないので、これはANSIのSQLです:

select coalesce(t1.id, t2.id) as id, 
     t1.name, 
     t2.name 
from table1 t1 
    full outer join table2 t2 on t1.id = t2.id 
where t1.name is distinct from t2.name; 
0
select isnull(a.id, b.id), case when a.value is not null and b.value is not null then a.value + '***' + b.value 

他合体(a.value、b.value)終了table_1から完全な外部結合table_2 b on a.id = b.id

関連する問題