Isnull and is null in SQL server

October 9, 2009 12:11 by andyh

Some time ago , i attended a training course and got chatting to a fellow learner, who was talking about ISNULL.

For a while i was thinking he was saying IS NULL, which confused me , but he explained the difference and , if like me , you never got round to readingthat part of the manual, you'll find it quite usefull.

 

ISNULL effectively is a nicelittle command that  tells SQL server .... "If this vaue is null, then replace it with another value"

whereas...

IS NULL is a comparison for any values that are NULL.

 

THE ISNULL statement is particularly usefull for when you've got data that hasn't been filled in or collected and yet is displayed in a report to an end user.

 

 

 

 


Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading