exit44 Posted March 15, 2010 Share Posted March 15, 2010 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! Quote Link to comment https://forums.phpfreaks.com/topic/195335-very-general-question-purpose-of-null/ Share on other sites More sharing options...
aeroswat Posted March 15, 2010 Share Posted March 15, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/195335-very-general-question-purpose-of-null/#findComment-1026527 Share on other sites More sharing options...
exit44 Posted March 15, 2010 Author Share Posted March 15, 2010 Very helpful article. Thank you for posting it for me. Quote Link to comment https://forums.phpfreaks.com/topic/195335-very-general-question-purpose-of-null/#findComment-1026549 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.