1
When using the SELECT
to obtain data from tabela_A
by making a junction with the tabela_B
, normally, and believing it to be the correct form, we use some of the commands JOIN
. Ex:
SELECT codigo, nome FROM tabela_A a
INNER JOIN tabela_B b ON b.fk_tabela_B = a.codigo
However, the same condition I can get using the following syntax:
SELECT codigo, nome FROM tabela_A a, tabela_B
WHERE b.fk_tabela_B = a.codigo
The first example has an easier reading, IMO, and the second example saves some characters.
- But what’s the difference in the use of the two?
- There are issues of performance or different treatment of the data obtained?
- I can say that only one example is the right way to do?
What’s the difference between joining tables by JOIN and WHERE?
– rray