Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Colum Not Null or Null Better ? Why ?

Author  Topic 

aravindt77
Posting Yak Master

120 Posts

Posted - 2007-06-15 : 02:56:46
Hi,

Warm Wishes To All !!!!

I want to know in particluar , whether it is desireable to
keep clolumn in table as Default Null rather than
making Default Blank

Aravind

pbguy
Constraint Violating Yak Guru

319 Posts

Posted - 2007-06-15 : 03:05:58
Keep default to some value instead of NULL..

Because NULL is a unkown value

--------------------------------------------------
S.Ahamed
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-06-15 : 04:07:44
You need to find a good definition of NULL.

It is an Unknown value. Either it will never be known, or it will become known in the future.

That is VERY different to a Default value, which is a known value that we can allocate.

For example, a new customer may be given "PriceList1". That is a known price list. They may be given a different price list in the future, but if they want to shop right now they will be using "PriceList1".

Kristen
Go to Top of Page

aravindt77
Posting Yak Master

120 Posts

Posted - 2007-06-15 : 04:20:40
Thanks for your kind suggession Kristen..

but if a column that is not mandatory ... and keep NULL as
its default value rather than BLANK will make any difference
in performance of T-SQL or maitaining the Table

Thanks & Regards

Aravind

quote:
Originally posted by Kristen

You need to find a good definition of NULL.

It is an Unknown value. Either it will never be known, or it will become known in the future.

That is VERY different to a Default value, which is a known value that we can allocate.

For example, a new customer may be given "PriceList1". That is a known price list. They may be given a different price list in the future, but if they want to shop right now they will be using "PriceList1".

Kristen

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-06-15 : 06:01:32
The problem will happen only if you dont know how to handle NULL

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -