标签: sql join
为什么此查询从两个表返回而不是仅从OVPM返回?
SELECT * from OVPM M1 JOIN VPM2 M2 ON M2.DocNum = M1.DocNum AND Canceled = 'N' WHERE M1.DocNum = '2292'
答案 0 :(得分:5)
因为您查询了所有内容*。如果您只需要来自OVPM的数据,请将其替换为M1.*
*
OVPM
M1.*