我必須與每個列(id)的表(tbla和tblb):oracle sql完全加入表中的一個不在
select * from tbla;
ID
---
1
3
5#A
select * from tblb;
ID
---
2
3
現在我需要一個完整的加盟:
select a.id, b.id
from tbla a
full outer join tblb b on b.id = a.id;
ID ID1
--------
1
3 3
5#A
2
...但不包含#-sign在tbla.id
select a.id, b.id
from tbla a
full outer join tblb b on b.id = a.id
where a.id not like '%#%';
ID ID1
--------
1
3 3
條目,爲什麼是ID 2項從tblb失蹤?
謝謝,第二選擇工作正常。第一個還包含5#A – Marc 2013-05-06 15:08:49
戈登再次保存一天!謝謝! – 2013-05-06 18:03:02