You are here: Re: set default value for a char column?? « MsSQL Server « IT news, forums, messages
Re: set default value for a char column??

Posted by Hugo Kornelis on 09/25/06 22:56

On 25 Sep 2006 11:22:15 -0700, tlyczko wrote:

>Or am I better off allowing fields like this to be null in the
>tables/columns specification and enforcing data entry per se in the
>front end????

Hi Tom,

Gert-Jan answered your question about how to set the default.

But I'm glad you asked this question - in SQL, the NULL symbol is
specifically designed to signal missing data. Not everyone agrees over
the question of the normal behaviour of NULL in different situations is
really the most appropriate for a "missing value" marker. But I don't
think that you'll find anyone who would argue that '123-45-6789' will
ever behave more appropriate for "missing value" than NULL does.

So short answer - don't use a default to signify missing data, use NULL.
And make sure that you understand three-valued logic and other quirks of
the behaviour of NULL.

--
Hugo Kornelis, SQL Server MVP

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация