文件名称:外连接基于Oracle-SQL语言基础
文件大小:5.26MB
文件格式:PPT
更新时间:2024-05-15 13:24:58
SQL 基础
外连接(基于Oracle) * SELECT table1.column, table2.column FROM table1, table2 WHERE table1.column(+) = table2.column; SELECT table1.column, table2.column FROM table1, table2 WHERE table1.column = table2.column(+); 可以用外连接来查出在一个表中不匹配连接条件的行. 外连接的符号是: (+). * Returning Records with No Direct Match with Outer Joins The missing row(s) can be returned if an outer join operator is used in the join condition. The operator is a plus sign enclosed in parentheses (+), and it is placed on the “side” of the join that is deficient in information. This operator has the effect of creating one or more null rows, to which one or more rows from the nondeficient table can be joined. In the syntax: table1.column = is the condition that joins (or relates) the tables together. table2.column (+) is the outer join symbol, which can be placed on either side of the WHERE clause condition, but not on both sides (Place the outer join symbol following the name of the column in the table without the matching rows.) Instructor Note Demo: l4ejoin.sql Purpose: To illustrate an equijoin leading to an outer join.