Re: NULL vs NOT NULL in database
Posted in 2000
Topics: SQL Development & Query Writing
--- manel@semic.es (Manel Falc' i Aige) > wrote: >>The main problem is detecting the difference between a "REAL" blank >>value and one that indicates a NULL. Do you care? Even if you do not >>today, you may in a month, things like this are inevitable. >Murphy's law ? > >But I have an example that it seems better to put spaces instead of >null: But why even ask if your example is what you've already settled on? >If this field is a key (usually of a composite key), null value can >be a problem in order to make some joins ... Define 'problem'. Why is it a key field if it can contain nulls? That sounds like more of a potential problem to me. >in the other hand, you have to convert explicitly the null value to >spaces before recording, and that is so nasty and annoying ... > >Regards, >Manel Falc', > == Maintainer of the procrastinator's FAQ. Well, maybe tomorrow I will be. _____________________________________________________________ Want a new web-based email account ? ---> http://www.firstlinux.net
A case could be a field that users can fill or not on an input. This field wouldn't be a primary key but it could be part of a composite index. Why not ? life is not so simple ... Manel On Mon, 17 Jul 2000 13:18:38 -0700 (PDT), Carlos Benjamin <benj@firstlinux.net> wrote: > > > >--- manel@semic.es (Manel Falcó i Aige) >> wrote: >>>The main problem is detecting the difference between a "REAL" blank >>>value and one that indicates a NULL. Do you care? Even if you do not >>>today, you may in a month, things like this are inevitable. >>Murphy's law ? >> >>But I have an example that it seems better to put spaces instead of >>null: > >But why even ask if your example is what you've already settled on? > >>If this field is a key (usually of a composite key), null value can >>be a problem in order to make some joins ... > >Define 'problem'. > >Why is it a key field if it can contain nulls? That sounds like more of a potential problem to me. > >>in the other hand, you have to convert explicitly the null value to >>spaces before recording, and that is so nasty and annoying ... >> >>Regards, >>Manel Falcó, >>