内与外连接-复杂查询技术-连接

时间:2021-04-25 22:11:32
【文件属性】:
文件名称:内与外连接-复杂查询技术-连接
文件大小:671KB
文件格式:PPT
更新时间:2021-04-25 22:11:32
sql 内与外连接 在SQL: 1999 中,连接两个表,仅返回匹配的行的连接,称为内连接 在两个表之间的连接,返回内连接的结果,同时还返回不匹配行的左(或右)表的连接,称为左(或右)连接 在两个表之间的连接,返回内连接的结果,同时还返回左和右连接,称为全连接 * Qualifying Ambiguous Column Names You need to qualify the names of the columns in the WHERE clause with the table name to avoid ambiguity. Without the table prefixes, the DEPARTMENT_ID column could be from either the DEPARTMENTS table or the EMPLOYEES table. It is necessary to add the table prefix to execute your query. If there are no common column names between the two tables, there is no need to qualify the columns. However, using the table prefix improves performance, because you tell the Oracle Server exactly where to find the columns. The requirement to qualify ambiguous column names is also applicable to columns that may be ambiguous in other clauses, such as the SELECT clause or the ORDER BY clause. Instructor Note Demo: 4_loc.sql Purpose: To illustrate a SELECT clause with no aliases.

网友评论