by Dexter | Dec 5, 2020 | Oracle SQL
In this article, we will be learning about the AVG aggregate function in Oracle. AVG is a group function as it works on a group of rows and is used for calculating the average value. Oracle AVG syntax SELECT AVG(expression) FROM table [WHERE conditions]; Here,...
by Dexter | Dec 5, 2020 | Oracle SQL
In this article, we will be learning about the DECODE function in Oracle. DECODE function is used to implement if-then-else logic in your SQL query without using stored procedure. Syntax The general syntax for the DECODE function is as follows: DECODE( expression ,...
by Dexter | Dec 5, 2020 | Oracle SQL
In this article, we will learn how to use COALESCE function in Oracle. COALESCE is a function that checks a list of values and returns the first non-null value it finds. Syntax The syntax of COALESCE function is as follows: COALESCE( e1, e2, e3, e4…..) Here, e1,...
by Dexter | Dec 5, 2020 | Oracle SQL
In this article, we will learn how to use NULLIF function in Oracle. NULLIF compares two arguments and returns NULL if both the arguments are equal and in case they are not equal then it returns the first argument. Syntax: The general syntax of NULLIF function is as...
by Dexter | Dec 5, 2020 | Oracle SQL
In this article, we will learn how to use NVL2 function and how is it different from existing NVL function. NVL2 function is used to substitute other values based on whether our expression is NULL or not. Syntax The syntax of NVL2 function is as follows: NVL2 (...
by Dexter | Dec 5, 2020 | Oracle SQL
NULL is a special value in a Oracle which represents absence of value in a table. For this reason, any calculation performed on NULL values will give us a NULL value in result. This is not always desirable and for this reason we might want to replace NULL with some...