表A 中有一条数据
ID code year money
20858 01 2006 10表B中有5条数据
cod
01
02
03
04
05
我要查询得到结果如下:
ID code year money
20858 01 2006 10
20858 02 2006 0
20858 03 2006 0
20858 04 2006 0
20858 05 2006 0请高手们赐教!
ID code year money
20858 01 2006 10表B中有5条数据
cod
01
02
03
04
05
我要查询得到结果如下:
ID code year money
20858 01 2006 10
20858 02 2006 0
20858 03 2006 0
20858 04 2006 0
20858 05 2006 0请高手们赐教!
from A right join t on A.code=B.code
where c.id=a.id(+)
from a, b;
这样写起SQL怪怪的.