开发者

Query Join Question

开发者 https://www.devze.com 2023-02-20 12:12 出处:网络
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

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.*

0

精彩评论

暂无评论...
验证码 换一张
取 消