I have a table A and B, both has one column and two rows as follows,
A B
-------
C1 C2
1 1
1 1
1 0
0 0
If I apply a inner join on this and the it is returning 8 rows as a results,
Select C1,C2 from A inner join B on A.C1=B.C2;
Result
---------
C1 C2
1 1
1 1
1 1
1 1
1 1
1 1
0 0
0 0
And I am guessing that, first row of the C1 column is checking with the data of all C2 columns. If it's matches, its returning result otherwise, it won't. The same method was following for the rest of the columns. Correct me, if my understanding was wrong and please assist with the answer for the below question;
I have two tables A,B both are having two columns. What will be the result if we apply inner join, please explain me with functionality.
A B
----–-----------
C1 C2 C3 C4
1 1 1 1
1 1 1 0
Select C1,C2,C3,C4 from A inner join B on A.C1=B.C3;
It's returning 4 rows, please explain how?