Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Does "0" exist for DATE?

Re: Does "0" exist for DATE?

From: Kenneth C Stahl <BlueSax_at_Unforgettable.com>
Date: Fri, 07 Jan 2000 08:08:42 -0500
Message-ID: <3875E55A.D4E16711@Unforgettable.com>


Casey Claiborne wrote:
>
> Hello,
>
> Is there a way to initialize DATE with a default? For example, an
> INTEGER type can be set to 0, so can a FLOAT.
>
> For example, suppose I have a field for a Customer called
> DateOfMarriage. If the customer is not married, this field does not
> apply. What can I set it to in the database? If I use NULL, then
> I will have to worry about ISNULL or ISNOTNULL situations.
>
> Any help on this issue would be *greatly* appreciated :)
>
> TIA
>
> Casey

But that is what you are supposed to do. If it doesn't have a real value then it should be set to null. Part of learning sql programming is learning how to handle null values correctly. Trying to shoe-horn workarounds will generally get you in trouble down the road somewhere. The best bet is to learn how to use sql properly and conform to universally accepted conventions. Received on Fri Jan 07 2000 - 07:08:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US