Join (inner, left, right) is the difference?

left join (left coupling) to return all records including records left table and the right table join equal field.

select * from app01_publisher left join app01_book on app01_publisher.id = app01_book.publish_id


right join (the right coupling) to return all records including records left table and the right table in the equal field coupling.
SELECT * from the Join app01_book app01_publisher right app01_publisher.id ON = app01_book.publish_id 

Inner the Join (equivalent connections) returns only the rows equal to the field of coupling two tables.

select * from app01_publisher inner join app01_book on app01_publisher.id = app01_book.publish_id
 
 

Guess you like

Origin www.cnblogs.com/raoziming18/p/11162696.html