X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B3DB4475E23 for ; Sun, 23 Feb 2003 14:34:40 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 03879-09 for ; Sun, 23 Feb 2003 14:34:30 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id A823B475DFD for ; Sun, 23 Feb 2003 14:22:21 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 90CE243A928; Sun, 23 Feb 2003 14:22:21 -0500 (EST) From: "codeWarrior" X-Newsgroups: comp.databases.postgresql.sql Subject: Re: inserting multiple rows with one statement Date: Sun, 23 Feb 2003 11:26:17 -0800 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 17 Message-ID: References: Reply-To: "codeWarrior" X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/636 X-Sequence-Number: 12034 INSERT () SELECT (); "Cali Hotstuff" wrote in message news:e30679f9.0302211417.67629243@posting.google.com... > I know that this is easy to do in a programming language or with a > script, but is there any way -- purely in SQL -- to insert multiple > rows based on the results of a subquery. > > ie, if SubQuery yields rows {x,y,z}, I want to somehow insert these > three different rows into MyTable on the same query. > > Thanks in advance, > cali