QQ网名大全

Oracle一个表的两个字段分别对应另外两个表的id

select case when tab1.id is not null then null else main.tab2 end as 字段2
,case when tab2.id is not null then null else main.tab1 end as 字段1
,tab1.city || tab2.city
from main , tab1, tab2
where main.id1 = tab1.id1(+)
and main.id2 = tan2.id1(+)
佚名
2024-06-09 22:17:40
最佳回答
类似问题(10)