Re: Copying

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Copying
Дата
Msg-id D6B5DF48-02F6-11D9-A626-000A95C88220@myrealbox.com
обсуждение исходный текст
Ответ на Copying  (Jake Stride <nsuk@users.sourceforge.net>)
Список 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


В списке pgsql-novice по дате отправления:

Предыдущее
От: Jake Stride
Дата:
Сообщение: Copying
Следующее
От:
Дата:
Сообщение: Opinions Requested - PG API or Abstraction Layer