Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Here is the script :
A:
Load * Inline
[id, Category
0,cat0
1,cat1
2,cat2];
B:
Load * Inline
[id, SubCategory
0,subCat0
1,subCat1
3,subCat3];
Left Join(A)
Load *
Resident B;
id | Category | SubCategory |
0 | cat0 | subCat0 |
1 | cat1 | subCat1 |
2 | cat2 | |
3 | subCat3 |
Was not expecting the row corresponding to id=3 here.
while :
Roght Join(A)
Load *
Resident B;
id | Category | SubCategory |
0 | cat0 | subCat0 |
1 | cat1 | subCat1 |
3 | subCat3 |
Could some one help me with it ?
abhiagar wrote:
But why is not the same thing happening while doing a right join. I have not dropped A either.
Right join (A) resident B only keeps rows in A that are also in B. You're telling it you only want rows that exist in the "right" table (B). You should still drop B, but you don't see the extra row because it no longer exists.