Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1D5BF47591E for ; Tue, 13 Aug 2002 23:12:18 -0400 (EDT) Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (Postfix) with ESMTP id 0AD00475917 for ; Tue, 13 Aug 2002 23:12:17 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g7E3CI124506 for pgsql-docs@postgresql.org; Tue, 13 Aug 2002 23:12:18 -0400 (EDT) From: Bruce Momjian Message-Id: <200208140312.g7E3CI124506@candle.pha.pa.us> Subject: ANSI join types In-Reply-To: <200208011633.g71GXQu02723@candle.pha.pa.us> To: PostgreSQL-documentation Date: Tue, 13 Aug 2002 23:12:18 -0400 (EDT) X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/7 X-Sequence-Number: 1425 I got this list from Gavin Roy's presentation at O'Reilly. Is there a good spot for this summary? Also, I can not find documentation on UNION JOINS in our docs. --------------------------------------------------------------------------- Bruce Momjian wrote: > SELECT > * JOINS > > * Cross: All combinations of rows are used > * Inner: Only rows where matches are found are retained > * Left (Outer): Returns all rows from table A, matched or not, and > only rows from table B where matches are found > * Right (Outer): Inverse of Left, returns all rows from table B and > only matches from table A > * Full: A combination of left and right. Where matches are not > found, NULLs fill the columns of the other table > * Union: This is different than the UNION operator used to merge the > output of multiple queries. This is the inverse of an Inner, only > rows are returned when no matches are found > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 853-3000 > + If your life is a hard drive, | 830 Blythe Avenue > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073