Re: Duplicating A Row

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jeff Flowers" <duckfoo(at)fastmail(dot)fm>
Cc: "PGSQL-Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Duplicating A Row
Date: 2004-11-25 16:35:05
Message-ID: 29897.1101400505@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Jeff Flowers" <duckfoo(at)fastmail(dot)fm> writes:
> Is there an easy way to duplicate a row within a table?

INSERT INTO foo SELECT * FROM foo WHERE some-conditions;

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Evert Meulie 2004-11-26 11:45:01 What causes 'FATAL: invalid cache id: 30' in my postgresql log?
Previous Message Jeff Flowers 2004-11-25 15:43:56 Duplicating A Row