EQUI JOIN
这是一种最普通的 JOIN 操作,它包含两种连接方式:
INNER JOIN(或者是 JOIN )
OUTER JOIN(包括: LEFT 、 RIGHT、 FULL OUTER JOIN)
用例子最容易说明其中区别:
-- This table reference contains authors and their books.#这是一个表格包含作者和他们的书籍。
-- There is one record for each book and its author.#这是一条记录关于每个书籍和作者。
-- authors without books are NOT included#没有书的作者不包含在内。
author JOIN book ON author.id = book.author_id
book为主,有book的author包含在内。
-- This table reference contains authors and their books
-- There is one record for each book and its author.
-- ... OR there is an "empty" record for authors without books #没有book的作者的book的那一栏是空
-- ("empty" meaning that all book columns are NULL)
author LEFT OUTER JOIN book ON author.id = book.author_id