Thursday , February 21 2019
Home / Tag Archives: functions in sql server

Tag Archives: functions in sql server

ISNULL() Vs NULLIF() in sqlserver


In this article I will explain the differences between the ISNULL() and NULLIF() functions in SQL Server 2012. ISNULL() Function The ISNULL() function is used to replace NULL with the specified replacement value. This function contains only two arguments. Syntax ISNULL (check_exp, change_value) Example 1 : Select ISNULL(null,15) ‘ISNULL VALUE’ output: 15 …

Read More »

Multirow Functions:-


Multirow Function:- These functions process group of Rows and Return one value. This functions are also called group functions or aggregate functions. 1.Max():- Returns Maximum value [crayon-5c6e5c2a83315747631908/] [crayon-5c6e5c2a8331c425387204/] Maximum salary of managers? select Max(sal)from emp where Job=’MANAGER’ 2.Min():- Returns Minimum value [crayon-5c6e5c2a8331f952820658/] [crayon-5c6e5c2a83322158177334/] 3.Sum():- Returns total [crayon-5c6e5c2a83324113555420/] 4.Avg():- Returns average …

Read More »

Special Functions

sql server special functions

Special Functions:- below are the Special Functions in sql server. 1.IsNUll():- Used to convert Nulls [crayon-5c6e5c2a83751233584076/] if expr1 is Null returns expr2 if expr1 is NotNull returns expr1 only [crayon-5c6e5c2a83759947411830/] Sal+comm as total sal from enp empno,ename,sal,comm,sal+comm as totalsal from enp. In the above case if something sal+Null= Null …

Read More »