Re: Insert more than one t-uple in a single sql

From: Klint Gore <kg(at)kgb(dot)une(dot)edu(dot)au>
To: Gonzalo Villegas <chalo1970(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Insert more than one t-uple in a single sql
Date: 2006-02-09 23:26:06
Message-ID: 43EBCF8E1A.1A7AKG@129.180.47.120
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 9 Feb 2006 17:57:03 -0500, "Gonzalo Villegas" <chalo1970(at)hotmail(dot)com> wrote:
>
>
> Hi all,
>
> I'm trying to insert more than one t-uple in a single sql query. Just like
>
> copy table (field1,field2,...) from ....
>
> It must be something like
>
> insert into table (field1,field2,...) values (v1,v2,...),(b1,b2,...),
> (c1,c2,...)

insert into table (field1,field2)
select v1,v2
union all
select b1,b2
union all
select c1,c2

klint.

+---------------------------------------+-----------------+
: Klint Gore : "Non rhyming :
: EMail : kg(at)kgb(dot)une(dot)edu(dot)au : slang - the :
: Snail : A.B.R.I. : possibilities :
: Mail University of New England : are useless" :
: Armidale NSW 2351 Australia : L.J.J. :
: Fax : +61 2 6772 5376 : :
+---------------------------------------+-----------------+

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rick Gigger 2006-02-09 23:29:26 Re: Insert more than one t-uple in a single sql
Previous Message Chris 2006-02-09 23:13:30 Re: Insert more than one t-uple in a single sql