0
Not knowing the structure of the table, it seems that the field CLI_BAI_CODIGO
only belongs to one column (otherwise the BD engine would complain that it could not know to which table the field would refer).
For this reason, the junction condition as it is is equivalent to " 1 = 1 " or always true (the behavior would be the same if it were not even present). When this happens, the result obtained is the combination of all the rows of the first table with all the rows of the second table (operation also called produto interno
). On this result space the filter is applied on the lines that refer to the `CLI_BAI_CODIGO IN (2,3,4)``.
Together all this, the first column appears duplicated (because it belongs to the same table as the field CLI_BAI_CODIGO
.
I hope it helps to understand the behavior, but as I said at the beginning, without the details of the scheme it is not possible to give details without being speculation.
I could not identify repeated values in the image you presented.
– anonimo
the cli_name in the image, John Mary appears several times, and the other clients who correspond both to neighborhoods 3 and 4, happens the same
– elder 1
But they appear along with different phones, which is what is expected for a select with a merge operation.
– anonimo
vdd, after doing 3 different ways I stopped to observe this, thank you :)
– elder 1