Differences between ISNULL and NULLIF ?

 Posted by Sqldev on 12/12/2013 | Category: Sql Server Interview questions | Views: 4564 | Points: 40
Answer:

This is one of the Sql server interview question which I found interesting. So,
I am sharing that here.

ISNULL and NULLIF accepts 2 parameters:

ISNULL: Returns parameter2 if Paremeter1 IS NULL. Else, it retunrs Parameter1



NULLIF: Returns parameter2 if Paremeter1 =parameter2 . Else, it retunrs Parameter1



Here is the complete video which shows differences between isnull and nullif


http://www.dotnetfunda.com/videos/show/264/differences-between-isnull-and-nullif-in-sql-server


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by Sqldev