1.交叉连接(CROSS JOIN):有两种,显式的和隐式的,不带ON子句,返回的是两表的乘积,也叫笛卡尔积,返回记录的个数应当是a和b表中符合记录的和. 显式:select [cols_list] from a cross join b where [condition] 隐式:select [cols_list] from a, b where [condition] 2.内连接(INNER JOIN):有两种,显式的和隐式的,返回连接表中符合连接条件和查询条件的数据行,和我们写普通的sql
原文地址:(https://www.w3resource.com/sql/joins/perform-a-full-outer-join.php) What is Full Outer Join in SQL? In SQL the FULL OUTER JOIN combines the results of both leftand right outer joins and returns all (matched or unmatched) rows from the tables on
--创建测试表wwif OBJECT_ID('qq') is not null drop table qqcreate table qq([序号] varchar(5),[内容1] varchar(10),[内容2] varchar(15))insert into qq([序号],[内容1],[内容2])select 'dd','zoumin','yuzulin'union all select 'cc','zm','yz'union allselect 'AA','z1','yz1'union
Outer Join Query Over Dblink Can Fail With ORA-904 (Doc ID 730256.1) To Bottom Modified:03-May-2013Type:PROBLEM In this Document Symptoms Changes Cause Solution References APPLIES TO:Oracle Database - Enterprise Edition - Version 10.2.0.1 t
内连接 只连接匹配的行 左外连接 包含左边表的全部行(不管右边的表中是否存在与它们匹配的行),以及右边表中全部匹配的行 A left join B等价于A left outer join B 右外连接 包含右边表的全部行(不管左边的表中是否存在与它们匹配的行),以及左边表中全部匹配的行 A right join B 全外连接 包含左.右两个表的全部行,不管另外一边的表中是否存在与它们匹配的行.A full outer join B 例