Re: inserting multiple rows with one statement

From: "codeWarrior" <GPatnude(at)adelphia(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: inserting multiple rows with one statement
Date: 2003-02-23 19:26:17
Message-ID: b3b71c$2m4$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

INSERT () SELECT ();

"Cali Hotstuff" <calihotstuff(at)hotmail(dot)com> wrote in message
news:e30679f9(dot)0302211417(dot)67629243(at)posting(dot)google(dot)com(dot)(dot)(dot)
> 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

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2003-02-23 19:59:35 Re: 7.3 "group by" issue
Previous Message Eddie Cheung 2003-02-23 19:02:27 Help with query involving aggregation and joining.