Wednesday, November 2, 2011

ISNULL() -Returns Desired Value If The Field Vlue Is Null

This example shows the use of ISNULL() method.It returns the given value if the field value is NULL.This method takes two arguments first one is desired field and 2nd one is the value you want return if field has value NULL.

ISNULL( check_expression , replacement_value)
select  ISNULL(Name,'xyz') as Name from Stud_Master

No comments:

Post a Comment