Re: INSERTS and Queries - Mailing list pgsql-general

From Russ Brown
Subject Re: INSERTS and Queries
Date
Msg-id opr36q4dsm6sifx0@relay.plus.net
Whole thread Raw
In response to INSERTS and Queries  ("C G" <csgcsg39@hotmail.com>)
List pgsql-general
On Mon, 01 Mar 2004 13:36:35 +0000, C G <csgcsg39@hotmail.com> wrote:

> Dear All,
>
> I can use insert with 'select' if I do this
>
> INSERT INTO TABLE t1 (col1) SELECT stuff FROM t2;
>
> But I want to insert more than one thing into the table, e.g.
>
> INSERT INTO TABLE t1 (col1,col2) SELECT stuff FROM t2 , 100;
>
> Any ideas on how I would achieve this?
>


INSERT INTO TABLE t1 (col1,col2) SELECT stuff, 100 FROM t2;


> Thanks
>
> Colin
>
> _________________________________________________________________
> Express yourself with cool emoticons - download MSN Messenger today!
> http://www.msn.co.uk/messenger
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

pgsql-general by date:

Previous
From: "C G"
Date:
Subject: INSERTS and Queries
Next
From: Nick Barr
Date:
Subject: Re: INSERTS and Queries