Re: serial data type

Поиск
Список
Период
Сортировка
От Joseph Healy
Тема Re: serial data type
Дата
Msg-id 20040926000133.GB17139@joes
обсуждение исходный текст
Ответ на Re: serial data type  (Tom Allison <tallison@tacocat.net>)
Ответы Re: serial data type
Список pgsql-general
On Sat, Sep 25, 2004 at 07:20:23PM -0400, Tom Allison wrote:
>
> Any idea how to set up a timestamp=now on every insert/update ?

when you create your table, use:

create table mytable (
        id serial primary key,
    updated timestamp default(now()),
    mydata int4
);

Joe


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

Предыдущее
От: gearond@fireserve.net
Дата:
Сообщение: IN or JOIN
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: serial data type