Jump to content

Very General Question: Purpose of NULL


exit44

Recommended Posts

I have a very general question about database design.  What is the purpose of allowing a field to be set to a NULL value in a database field.  I have been building for a while and have really never used this setting.  I always just test the output before displaying to the browser and if the field is empty I treat it accordingly.  What are the advantages of NULL over this or does it have other purposes?

 

Thanks!

Link to comment
Share on other sites

Maybe this will be helpful to you

 

http://www.informit.com/guides/content.aspx?g=sqlserver&seqNum=215

 

I have also recently found a great use for NULL values. I required the ability to find all the rows in one table that could not relate to a row in another table based on the joining key. The only way to display these were to display only rows in which the joining key was NULL.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.