Re: select into without creating new table - Mailing list pgsql-general

From Shridhar Daithankar
Subject Re: select into without creating new table
Date
Msg-id 3DB45B3F.249.AE3E3A5@localhost
Whole thread Raw
In response to select into without creating new table  ("Paul" <nomail@nomail.com>)
List pgsql-general
On 18 Oct 2002 at 13:44, Paul wrote:
> How can I select data from table into an existing table. I've redesigned
> some tables and thus want my data to be copied from the old table to the new
> one. Since the column order, names (and the number of columns) is not equal
> i thought of using:
>
> select column1,column2 into newtable from oldtable

Try insert into newtable select * from oldtable;

See insert syntax for more details..

HTH


Bye
 Shridhar

--
lighthouse, n.:    A tall building on the seashore in which the government
maintains a lamp and the friend of a politician.


pgsql-general by date:

Previous
From: "Shridhar Daithankar"
Date:
Subject: Re: transactions
Next
From: Doug McNaught
Date:
Subject: Re: Migrating from Informix to Postgre