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