Int [] intAry2={10, 20, 30, 50, 60, 70, 80};
Var query1=
The from val1 intAry1 in
The join val2 intAry2 on val1%5 equals in val2%15 into val2Grp
The from GRP in val2Grp. DefaultIfEmpty (int. MaxValue)
Select new {VAL1=VAL1, VAL2GRP=GRP};
Why the above code can achieve left connections? Val2Grp only saved intAry2 grouping result, finally select how together?
CodePudding user response:
Because the join of two tables haveAnd DefaultIfEmpty get back on the left table is given priority to, do not exist,
2 and set is left join,