SQL SERVER – What is a NULL value and What are the pros and cons of using NULLS

A NULL value takes up one byte of storage and indicates that a value is not present as opposed to a space or zero value.

A NULL is not a space or empty string or a zero. But some value undefined telling that value is not present.

From front End we can send the value as NULL by DBNull.Value

And in SQL SERVER it can be searched by following query

use AdventureWorksDW2008R2
Go
Select * from dbo.DimCustomer where Suffix IS NULL

here it will return the rows with Suffix column containing a NULL means Noting.

Reference : Dilip Kumar Jena ( https://sqlexplore.wordpress.com )

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s