SQL> create table s as
2 select nvl(a.n1,b.n1) as n1,nvl(a.n2,b.n2) as n2,n3,n4,(n4-n3) as n5 from
a full join b on a.n1=b.n1 and a.n2=b.n2;Table created.SQL> select * from s;N1 N2 N3 N4 N5
-- ---------- ---------- ---------- ----------
A 456 34 55 21
B 135 345 643 298
B 456 34 55 21
A 123 235
B 332 534
C 135 643
A 789 342
B 365 7748 rows selected.SQL> select * from s where N1='A';no rows selectedSQL> select * from a where N1='A';N1 N2 N3
-- ---------- ----------
A 123 235
A 456 34
为什么没有返回
2 select nvl(a.n1,b.n1) as n1,nvl(a.n2,b.n2) as n2,n3,n4,(n4-n3) as n5 from
a full join b on a.n1=b.n1 and a.n2=b.n2;Table created.SQL> select * from s;N1 N2 N3 N4 N5
-- ---------- ---------- ---------- ----------
A 456 34 55 21
B 135 345 643 298
B 456 34 55 21
A 123 235
B 332 534
C 135 643
A 789 342
B 365 7748 rows selected.SQL> select * from s where N1='A';no rows selectedSQL> select * from a where N1='A';N1 N2 N3
-- ---------- ----------
A 123 235
A 456 34
为什么没有返回
你用LIKE试试