#交叉连接 (return to Cartesian intersection)
axb={(b) |a belongs to A and b belongs to B}, then the set formed by AXB is called the Cartesian set
1 SELECT * from Cross Join depts; 2 SELECT * from Employees,depts;
#内连接 (Only records that meet the join condition are returned, and records that do not meet the join condition are not returned)
1 Select * from INNER Join 2on= t2.dept_id;
#右外连接 (not only records that meet the join condition are returned, but records that do not meet the join condition are returned, but no records are returned from the table that do not meet the join criteria)
1 Select * from Right Join 2on= t2.dept_id;
#左外连接 (not only records that meet the join condition are returned, but records that do not meet the join condition are returned, but no records are returned from the table that do not meet the join criteria)
Select * from Left Join on= t2.dept_id;
SELECT t1.name ' employee name ', T2.name ' department ' from employees T1
1 Left Join on = t2.dept_id;
MySQL Connection Query Learning notes