0
votes

Table A: (6 records with '1' value) 1 1 1 1 1 1

Table B: (2 records with '1' value) 1 1

Select * from TableA left join TableB on TableA.col1 = TableB.col1 ?

Select * from TableB left join TableA on TableB.col1 = TableA.col1?

Select * from TableA inner join TableB on TableA.col1 = TableB.col1?

Select * from TableA full outer join TableB on TableA.col1 = TableB.col1?

1
What result are you trying to get? - Mureinik
Try running them. - Gordon Linoff

1 Answers

0
votes

For such data, all queries are equivalent to inner join because (left and full) outer joins are about rows existing in one table and not in the other, which is not your case.

Moreover, inner joins on same duplicate value actually behave like cartesian product. Hence the result is 6*2=12 rows of values 1,1 in all cases.