View Single Post

   
  #2 (permalink)  
Old 04-17-2008, 09:45 PM
Michael Fuhr
 
Posts: n/a
Default Re: Copy data from table to table

On Wed, Apr 27, 2005 at 09:16:09AM -0400, Keith Worthington wrote:
>
> I can not think of a way to copy data directly betweeen two tables.


Have you tried INSERT ... SELECT?

INSERT INTO foo (a, b, c) SELECT a, b, c FROM bar;

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply With Quote