Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fB6M9Am04704 for ; Thu, 6 Dec 2001 17:09:11 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id fB6LeQH28238 for pgsql-sql@postgresql.org; Thu, 6 Dec 2001 16:40:26 -0500 (EST) (envelope-from news) From: Jean-Michel Chabanne X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Select into Date: Thu, 6 Dec 2001 22:43:15 +0100 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 31 Message-ID: <9uook6$rib$1@news.tht.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: scrappy@hub.org User-Agent: KNode/0.4 To: pgsql-sql@postgresql.org X-Archive-Number: 200112/101 X-Sequence-Number: 5924 Christopher Kings-Lynne wrote: > Hi All, > > Is it possible to insert into a table based on a select from another > table? > > The docs for SELECT INTO and like seem to imply you can only create a > table based on a select, not append to an existing table. > > How do you do this? > > Chris > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > You have to use another syntaxe form : INSERT INTO target_table (COLx,COLy....) select COLa,COLB... from source-table [where ...] -- Jean-Michel Chabanne 77450 MONTRY (FRANCE) 48" 54' N - 2" 49' E Powered by Linux