表A
LINENUM PRICE
0 10
1 20
表B
ALINE AMOUNT PRICE
0 5 12
0 10 15
1 5 22
1 10 25
我现在的语句
SELECT * FROM A
LEFT JOIN B ON B.ALINE = LINENUM
这样输出的结果是
LINENUM PRICE ALINE AMOUNT PRICE
0 10 0 5 12
0 10 0 10 15
1 20 1 5 22
1 20 1 10 25
想要实现的结果是
LINENUM PRICE ALINE AMOUNT PRICE
0 10 0 5 12
NULL NULL 0 10 15
1 20 1 5 22
NULL NULL 1 10 25
------解决方案--------------------