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)
 Using nvarchar(max), should I default to NULL ?

Author  Topic 

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2008-08-05 : 17:47:02
Hi,
I hate having any fields in my table as NULL, there is this one table where I have 2 nvarchar(max) columns, and I am a little worried that the row size is going to get big.

If say 50% of the time one of the nvarchar(max) columns is going to be empty, should I set it to NULL?

If I default the value to '' what effect will this have?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-05 : 17:54:46
NULL is the absence of a value. '' is a value. I'd use NULL.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -