1. Example table A, Dept Department tableB. Employee tableDeptno corresponds to Dept.id to indicate the department number.2. LEFT JOIN keywordLeft JOINDefinedOn the basis of internal connections (e.g.),Adds the result of the left table's non-conformance to the result set. (Non-conforming results, "Administration Department"). The Right table column is filled with null.3, right connection. The statement keyword.Right JOINMinor changesAs previously defi
Label:desstyleclasshttptar ext
Outer Join Query over Dblink Can Fail with ora- 904 (Doc ID 730256.1)
to Bottom
Modified: 03-may-2013 Type: problem
In this Document
S
3.4, example 3.5, although the result set is the same, according to its SQL semantics, the execution process should be different. (I do not know the principle, here is not to delve into it) > Left Outer connectionSelect * from t_user u
Left outer Join on = A.user_id; Multilayer outer Joins Select * from t_user
--Three formats for connection queries select Ename, deptno,dname from EMP Natural join Dept;select ename, deptno,dname from EMP Join dept using (DEPTN o); Select Emp.ename, emp.deptno,dept.dname from EMP Join dept on emp.deptno!=dept.deptno;--Self-connect, treats a table as two tables for select E.ename,m.ename from EMP e-jo
1, left outside the connection to leave outer join, or leaving Jion,outer can be omitted to write, the bottom of the right connection and full connection is the same:The left outer join means that the data in the table on the left side of the right
1. Left OUTER JOIN: External Association
SELECT E.last_name, e.department_id, D.department_name
From Employees E
Left OUTER JOIN Departments D
On (e.department_id = d.department_id);
Equivalent to
SELECT E.last_name, e.department_id, D.department_name
From Employees e, departments D
WHERE e.department_id=d.department_
Recent BA user feedback has two seemingly very similar statements return the number of results is not the same, more strange, doubt is not hive bug
Query 1 Returns the number of results 6071
Select COUNT (Distinct reviewid) as dis_reviewcnt
from
(select A.reviewid from
bi.dpods_dp_reviewreport a left
outer join Bi.dpods_dp_reviewlog B on
a.reviewid=b.reviewid and b.hp_statdate= ' 2013-07-24 '
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.