Difference between linking tables with WHERE and with INNER JOIN

1

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 would like to know the difference between them. The difference between INNER JOIN and OUTER JOIN I know, but the difference between INNER JOIN and link using WHERE I do not know.

Thank you.

    
asked by anonymous 21.12.2017 / 18:21

1 answer

1

Here is a visual example of my comet:

Assuming we have two tables with a ratio of 1 to 1

NoticethefilterbehaviorofWHEREinbothqueriesandinthe2ndQuerynotetheINNERJOIN

Summarizing INNER JOIN - Returns row when there is at least one match in both tables.

    
21.12.2017 / 19:52