Thread: How to store empty to Date field ?
Dear All, How to store empty to Date field ? Thanks
Unfortunately, PG does not have any sense of an "empty" date. It must either be valid or NULL. Keary Suska Esoteritech, Inc. "Leveraging Open Source for a better Internet" > From: "kingking" <kingking@hknet.com> > Organization: Hub.Org Networking Services (http://www.hub.org) > Date: Tue, 25 Sep 2001 23:53:22 +0800 > To: pgsql-general@postgresql.org > Subject: [GENERAL] How to store empty to Date field ? > > Dear All, > > How to store empty to Date field ? > > Thanks > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >
To update all existing records with empty values: update table1 set datefield = null; To insert an empty value into a new record: insert into table1 (datefield) values (null); Best of luck, Andrew Gould --- kingking <kingking@hknet.com> wrote: > Dear All, > > How to store empty to Date field ? > > Thanks > > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 2: you can get off all lists at once with the > unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) __________________________________________________ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com