Received: from mx99.openu.ac.il (arbel.openu.ac.il [147.233.32.4]) by hub.org (8.9.2/8.9.1) with ESMTP id KAA49933 for ; Tue, 30 Mar 1999 10:12:10 -0500 (EST) (envelope-from herouth@oumail.openu.ac.il) Received: from talmon.openu.ac.il (talmon.openu.ac.il [147.233.32.11]) by mx99.openu.ac.il (Postfix) with ESMTP for id 872CE4B4EB; Tue, 30 Mar 1999 15:12:08 +0000 (Asia/Jerusalem) Received: from [147.233.148.140] (1164.pc.openu.ac.il) by talmon.openu.ac.il (Netscape Messaging Server 3.54) with ESMTP id AAA3DB5; Tue, 30 Mar 1999 17:13:53 +0200 X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: <3700E7C9.FCD0D4C5@bigfoot.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 30 Mar 1999 17:13:48 +0200 To: Chris Bitmead From: Herouth Maoz Subject: Re: [GENERAL] How to do this in SQL? Cc: pgsql-sql@postgreSQL.org At 17:03 +0200 on 30/03/1999, Chris Bitmead wrote: > Thanks! Now what if I had... > CREATE TABLE book (author oid, publisher oid); > > What is the syntax? Is it... > > INSERT INTO BOOK(author, publisher) > SELECT author.oid, publisher.oid > FROM author, publisher > WHERE author.name = 'Tolstoy' AND publisher.name = 'Penguin'; > > Is that right? Looks right to me. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma