1-- inner connection: INNER JOIN It represents a matching record that returns two table or Recordset join fields, representing the portion of two tables that are contained in each other 2Select * from Inner Join On Student.sno= sc.sno;
3 -- outer join (full join): Contains all rows of the left and right two tables, regardless of whether there are rows in the other side of the table that match them. A null value is substituted for a non-conforming condition. 4 -- Full connection: Indicates that two tables are grouped together, and left and right are not matched when replacing 5 select * from student full outer join SC on student.sno= Sc.sno;
6-- left connection: The left outer connection is also called LEFT JOIN, which means to include all records on the left table, all matching records on the right, and if not, fill them with empty. In other words, list the left table all, and the right side of the table to meet the criteria, the non-qualified null value instead. 7 Select * from Left outer Join on Student.sno=sc.sno;
8 --Right connection: The right outer connection is also called the right connection, which means including all the records on the right side table, matching the records on the left table, and if not, empty. In other words, as in left JOIN, list all of the right table, and the left table is eligible, the non-qualified null value substitution.9 Select * fromStudent Right outer JoinSc onStudent.sno=Sc.sno;
Ten --Natural join: Use the Equals (=) operator in the join condition to compare the column values of the connected column, but it uses the selection list to indicate which columns are included in the query result collection and to delete the duplicate columns in the Join table. In fact, as long as the field name is the same, the data type is different, you can do natural connection. One Select * fromStudent NaturalJoinSc
How Oracle tables are connected to tables (internal connection: INNER JOIN, outer join full connection: outer JOIN, LEFT join: Left OUTER JOIN, right connection: R outer JOIN, natural Connection: natural join)