Re: Copying

From: Michael Glaesemann <grzm(at)myrealbox(dot)com>
To: Jake Stride <nsuk(at)users(dot)sourceforge(dot)net>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Copying
Date: 2004-09-10 06:58:37
Message-ID: D6B5DF48-02F6-11D9-A626-000A95C88220@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


On Sep 10, 2004, at 3:36 PM, Jake Stride wrote:

> What I want to be able to do is:
>
> SELECT name, 3 FROM assets <<INTO>> assets
>
> Since id is a serial/has a default value you don't need to worry about
> it
> (iei the database should take care of it).

I think what you want to do is something along the lines of

INSERT INTO assets (name, jobno)
SELECT distinct name, 3
FROM assets
;

Michael

In response to

  • Copying at 2004-09-10 06:36:17 from Jake Stride

Browse pgsql-novice by date

  From Date Subject
Next Message operationsengineer1 2004-09-10 09:12:41 Opinions Requested - PG API or Abstraction Layer
Previous Message Jake Stride 2004-09-10 06:36:17 Copying