0
I have a question, there is some difference in executing the querys below?
SELECT C.NOMECARGO, F.NOMEFUNCIONARIO
FROM CARGO AS C
LEFT JOIN FUNCIONARIO AS F
ON C.IDCARGO = F.IDCARGO
SELECT C.NOMECARGO, F.NOMEFUNCIONARIO
FROM CARGO AS C
LEFT JOIN FUNCIONARIO AS F
ON F.IDCARGO = C.IDCARGO
Ola, Both bring all the positions that have or do not work, the order of the keys does not matter in this case
– André
So, regardless of the order of the keys my query will always be the same ?
– Higor Diniz
that, the result is the same
– André
André, thank you so much!!!
– Higor Diniz
As @André said, the result will be the same, but it is good practice to adopt a standard. Here, at work, I use as default the second option you mentioned (first the table I’m doing Join and then the table I’m relating to.
– Ranier Cordeiro
Got it, thank you guys so much !!!
– Higor Diniz