c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
SQL

Sql server isnull example?

| | SQL

In this article, I describe How to use NULLIF in SQL server. As we know nullif clause used to checks the value is null or not. If the value is null then we define some default value. 

SELECT ISNULL(NULLIF(Amount,''),0.00)FROM DBO.EMPLOYEE

In this above case, I am using isnull and nullif clause, first nullif clause check the amount is null or not .If it is null then return empty after that isnull clause will check whether the result is empty then return our default value.