Left JOIN connect left join or LEFT outer joinsql statement: SELECT * FROM student left join course on Student.id=course. The ID left OUTER JOIN contains all rows from the left table in the left join, and if there is no match in the right table for a row in the table, the portion of the right table in the corresponding row in the result is all empty (null) . right connects right join or correct outer Joinsql statement: SELECT * FROM student right joins course on Student.id=course. The ID right outer join contains all the rows in the right table of the correct join, and if a row in the left table does not match on the right table, the portion of the result corresponding to the left table is all empty (null). fully outer join full join or FULL outer joinsql statement: SELECT * FROM student complete join course on Student.id=course. The ID full outer join contains all the rows in both the left and right tables of the complete join, and if there is no match in the left table for a row in the table, the portion of the right table in the corresponding row in the result is all empty (null), and if a row in the left table does not match in the right table, the portion of the left table internal connection join or inner joinsql statement: SELECT * FROM student inner JOIN course on student.id=course. Idinner join is a comparison operator that returns only rows that meet the criteria. use the data after the query as a temporary table SELECT userid from--the number of users who purchased more than 30 in the order form UserId ( select Userid from orderinfo--OrderInfo Order Form group by UserId have SUM (Amount ) >30) as t1
Database left connection, right connection, inner connection