Table Links: Join on default preceded by modifier inner
Join within joins A and B tables all depending on the relationship may
The link should be displayed in a way that doesn't matter.
When there is a relationship in the middle of a two table, it needs to be rounded
Synthesize a table to show it
In the select and from the middle of the want to display the direct write up
After from a table splicing join another table on the back
Write the relationship between the two tables
Get the first piece of data in the car table and take the first one.
Data information according to the relationship on the brand table to find the number
According to the docking.
Example:
Show the code name Brand_Name.
Select code, name, Brand,brand_name from
Car
Join Brand on Car.brand=brand
. Brand_Code
Cartesian product: Complete splicing of two of the data to create a capital
SOURCE Waste
Select *from Car,brand where
Car.brand=brand.code to filter
Left join the data on this table shows all the right
On the side of the docking
Example:
Select Code,name,brand, Brand
. Brand_Name from car
Left JOIN Brand on
Car.brand=brand.brand_code
Right of the join shows all the docking to the left
Example:
Select Code,name,brand, Brand
. Brand_Name from car
Right Join Brand on
Car.brand=brand.brand_code
The condition after on is not necessarily the primary foreign key relationship as long as the number
It can be as type as
Table of SQL Links