General information
Forum:
Microsoft SQL Server
Bonnie;
"a NULL is almost always different than empty".
I was taught that you should use null for all data types to indicate that no data has been written. Giving it further thought it does not make sense to me to use null with char or varchar types when a space will indicate no data exists. Absolute statements as I learned in SQL Server classrooms (“Always use a null”! ) seem to not always be accurate. In the end it may be up to the designer to define such things.
Tom
>Sergey,
>
>It sounds like you and I don't agree on the use of NULLs. We use NULL for most columns, unless it's a PK or an FK that *must* be populated. IMHO, a NULL is almost always different than empty. Even for character data.
>
>~~Bonnie
>
>
>
>>>>Yes, in SQL 2000 fixed lenght data types always take the same space regardless what value is stored in it.<
>>>
>>>Another good reason to use varchars!!! <g>
>>
>>I'm not sure why would you want to use Null in the char/varchar field in the first place unless empty values is not the same as Null.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only