How to replace a column value with specified value if column value is null?

 Posted by vishalneeraj-24503 on 6/16/2014 | Category: Sql Server Interview questions | Views: 439 | Points: 40

Use IsNull in-built SQL-Server function to replace column value if column value is null or it has no value assigned.
Note:- IsNull will replace column value if and only if column value is null otherwise it will take column value if it has some values.

For Example:-
Select isnull(MIDDLE_NAME,'NA') as MIDDLE_NAME from employee_master;

Select isnull(Budget,0.0) as Budget from project_master;

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response