List:General Discussion« Previous MessageNext Message »
From:mfatene Date:July 6 2005 7:18am
Subject:Re: null data in table question
View as plain text  
don't forget to apply the correct changes to your queries. Having NULLs or not,
let you write for example :

select ...  from ... where midinials is NULL;

And be aware about NULL indexation in some storages. Those values are not
indexed for example in oracle. I'm not sure about innodb, but this sould be.

In all the cases, you can't have a unique index on such columns.


Selon Martijn Tonies <m.tonies@stripped>:

> Hi Scott,
> > I have created a web-based simple application, and used mysql for data
> storage. All has worked well. But I do have a simple question I would like
> to ask the group.
> >
> > I have some web-based forms that match table structure. Most of the
> important fields have validation, and I ensure good data into the table. But
> I have a few columns in the table such as "middleInitial" where I do not
> validate the data. And in the database is shows a null when I do a select *
> from.
> >
> > Is a null acceptable in the database, or is there something I should do on
> columns that the user may not put in data?
> Given that NULL means "unknown" and there's no value/state for "non
> applicable", NULLs don't belong in places where you actually want to fill in
> "nothing" or "empty".
> An empty string is an empty string. Why not insert that instead?
> With regards,
> Martijn Tonies
> Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
> Server
> Upscene Productions
> Database development questions? Check the forum!
> --
> MySQL General Mailing List
> For list archives:
> To unsubscribe:

null data in table questionScott Purcell5 Jul
  • Re: null data in table questionSGreen5 Jul
  • Re: null data in table questionMartijn Tonies5 Jul
    • Re: null data in table questionmfatene6 Jul