Обсуждение: Re: Timestamp not working

Поиск
Список
Период
Сортировка

Re: Timestamp not working

От
"codeWarrior"
Дата:
CREATE TABLE mytable (

    id serial not null primary key,

    myvalue varchar(50),

    create_dt timestamp not null default now()

);

INSERT INTO mytable (myvalue) VALUES ('When was this record inserted ?');
SELECT * FROM mytable;


"Si" <si@hotmail.com> wrote in message
news:88odf.2261$fN5.887@newsfe6-gui.ntli.net...
>I have added a field to one of my PostgreSQL tables in the "Timestamp"
>datatype, but when I add a row to that table I don't get the date and time
>inserted into that column? Do I need to put a default value into the column
>too?
>