From: | venkat <ven(dot)tammineni(at)gmail(dot)com> |
---|---|
To: | Nicholas I <nicholas(dot)domnic(dot)i(at)gmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: insert into help |
Date: | 2010-09-22 07:35:21 |
Message-ID: | AANLkTinkXOV-MT_FaCKMtFss5T+q_gbG+y6Pz5vb7oK6@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
HI,
Please go through
http://www.java2s.com/Tutorial/Oracle/0080__Insert-Update-Delete/CopyingRowsfromOneTabletoAnotherINSERTINTOselect.htm
<http://www.java2s.com/Tutorial/Oracle/0080__Insert-Update-Delete/CopyingRowsfromOneTabletoAnotherINSERTINTOselect.htm>Thanks
and Regards,
Venkat
On Wed, Sep 22, 2010 at 1:02 PM, Nicholas I <nicholas(dot)domnic(dot)i(at)gmail(dot)com>wrote:
> Hi,
>
> i have two tables,
> ---------------------------------------------------------------
> *table1
>
> id type serial, name varchar;*
> *--------------------------------------------------------------
> table 2
>
> name varchar;*
> ---------------------------------------------------------------
>
> i want to insert the values of table 2 into table 1, with automatic id's.
>
> insert into table1(select * from table2);
>
> is not working, how can i append the data to table 1 with auto incremented
> or nextval.
>
> -Nicholas I
>
From | Date | Subject | |
---|---|---|---|
Next Message | Steve | 2010-09-22 10:07:15 | Re: Question about PQexecParams |
Previous Message | Guillaume Lelarge | 2010-09-22 07:35:20 | Re: insert into help |