Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ptsfa.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!tektronix!hplabs!well!ptsfa!dsp From: dsp@ptsfa.UUCP (David St. Pierre) Newsgroups: net.database Subject: Re: outer joins Message-ID: <824@ptsfa.UUCP> Date: Sun, 25-Aug-85 14:47:35 EDT Article-I.D.: ptsfa.824 Posted: Sun Aug 25 14:47:35 1985 Date-Received: Wed, 28-Aug-85 21:11:35 EDT References: <450@im4u.UUCP> Reply-To: dsp@ptsfa.UUCP (David St. Pierre-150) Distribution: net Organization: Pacific Bell, San Francisco Lines: 22 I'll borrow the example from the ORACLE manual: "List all departments that have employees, plus those departments that do not have employees" SELECT dept.deptno, dname, job, ename from dept, emp where dept.deptno = emp.deptno(+) order by dept.deptno; Also: "List all departments that do not have any employees" SELECT distinct dept.deptno, dname, koc from dept, emp where dept.deptno = emp.deptno(+) and empno is null; -- David St. Pierre {ihnp4,dual,qantel}!ptsfa!dsp