Copy row from table to table

From: "Kall, Bruce A(dot)" <kall(at)mayo(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Copy row from table to table
Date: 2004-12-14 17:48:21
Message-ID: 41BF2765.4080308@mayo.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

What is the easiest way to copy a particular row from one table to
another (assuming all the columns are exactly the same). I want to
maintain a table ('backup_table') that has rows I have (or will be)
deleting from my 'original_table'. (Both tables have the same 68 columns).

I've tried

INSERT INTO backup_table SELECT * FROM original_table WHERE id='2305'

COPY seems to only work between tables and files.

Thanks,
Bruce

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Együd Csaba (Freemail) 2004-12-14 18:10:52 Re: Insufficient memory for this operation.
Previous Message Christian Kratzer 2004-12-14 17:34:05 Re: increasing max_connections on freebsd