登录 注册
当前位置:主页 > 资源下载 > 基于Oracle-SQL语言的外连接

基于Oracle-SQL语言的外连接

  • 更新:2024-07-07 11:33:32
  • 大小:5.26MB
  • 推荐:★★★★★
  • 来源:网友上传分享
  • 类别:Informix - 数据库
  • 格式:PPT

资源介绍

外连接(基于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.