Why does this query return from both tables instead of only from OVPM?
SELECT *
from OVPM M1
JOIN VPM2 M2 ON M2.DocNum = 开发者_如何学运维M1.DocNum
AND Canceled = 'N'
WHERE M1.DocNum = '2292'
Because you queried everything *
. If you need the data only from OVPM
- replace it with M1.*
精彩评论