2
I was learning SQL and came across the following instructions:
SELECT
tbl_Livros.Nome_Livro, tbl_Livros.ISBN_Livro, tbl_Autores.Nome_Autor
FROM
tbl_Livros, tbl_Autores
WHERE
tbl_Livros.AutorID_Livro = tbl_Autores.ID_Autor;
And the other:
SELECT
tbl_Livros.Nome_Livro, tbl_Livros.ISBN_Livro, tbl_Autores.Nome_Autor
FROM
tbl_Livros
INNER JOIN tbl_Autores ON tbl_Livros.AutorID_Livro = tbl_Autores.ID_Autor;
The 2 commands returned me the same records, I wonder what difference between them. The difference between INNER JOIN and OUTER JOIN I know, but the difference between INNER JOIN and link using WHERE I don’t know.
Thank you.
Where is to filter the query and innerjoin serves to connect keys in 2 or more tables. Oinnerjoin tras para vc a query in two tables being linked by a key Primary or a key Foreign
– Paulo Ricardo
If the query optimizer is doing the right job, there should be no difference between these queries. They are only two ways to specify the same desired result.
– Don't Panic