Thursday , August 16 2018
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-5b74f73960fa2715933943/] [crayon-5b74f73960fa8859374654/] Maximum salary of managers? select Max(sal)from emp where Job=’MANAGER’ 2.Min():- Returns Minimum value [crayon-5b74f73960fab875896269/] [crayon-5b74f73960fae139060485/] 3.Sum():- Returns total [crayon-5b74f73960fb0668756463/] 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-5b74f739613bd851602111/] if expr1 is Null returns expr2 if expr1 is NotNull returns expr1 only [crayon-5b74f739613c3690526311/] 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 »