From: | Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgreSQL(dot)org>, "Krasnow, Greg" <gak(at)hnc(dot)com> |
Subject: | Re: [GENERAL] default date |
Date: | 1998-08-04 12:54:59 |
Message-ID: | 5621.980804@bo.nettuno.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello Krasnow,,
lunedì, 3 agosto 98, you wrote:
KG> How can I create a table which has a date field and have the date field
KG> default to the system time when the record is inserted... like Oracle's DATE
KG> DEFAULT SYSDATE? Thanks.
KG> - Greg
KG> Greg Krasnow
KG> HNC Software Inc.
KG> Financial Solutions Group
KG> Senior Software Engineer
KG> Email: gak(at)hnc(dot)com
KG> Direct Phone: 619.799.8341
KG> Fax: 619.799.8036
SYSDATE?? What do you think about CURRENT_DATE? This is SQL standard.
example:
CREATE TABLE mytable (
mkey INTEGER,
mdate DATE DEFAULT CURRENT_DATE
);
Best regards,
Jose' mailto:sferac(at)bo(dot)nettuno(dot)it
From | Date | Subject | |
---|---|---|---|
Next Message | Krasnow, Greg | 1998-08-04 16:32:39 | float8 type |
Previous Message | The Hermit Hacker | 1998-08-04 03:15:19 | CD Distribution/Rates changed... |