Sql server 左连接查询最大记录
SELECT * FROM Billcode_in a LEFT JOIN Billcode_place b ON a.billcode=b.billcode AND b.id=(SELECT MAX(id) FROM Billcode_place WHERE billcode=b.billcode AND place_wavehouse_id=5);
SELECT * FROM Billcode_in a LEFT JOIN Billcode_place b ON a.billcode=b.billcode AND b.id=(SELECT MAX(id) FROM Billcode_place WHERE billcode=b.billcode AND place_wavehouse_id=5);