By using SELECT
to get the data of tabela_A
by joining with tabela_B
, normally, and assuming it to be the correct form, we use some of the JOIN
commands. 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 read, IMO, and the second example saves a few characters.
- But what's the difference in using the two?
- Are there performance issues or differential treatment of the data obtained?
- Can I say that only one of the examples is the correct way to do it?