- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the resemblance of COALESCE() function with IF-THEN-ELSE statement?
As we know that COALESCE() function returns first non-NULL value from the list of values. The following IF-THEN-ELSE statement is equivalent to COALESCE() function.
IF value1 is not NULL THEN output = value1; ELSIF value2 is not NULL THEN output = value2; ELSIF value3 is not NULL THEN output = value3; . . . ELSIF valueN is not NULL THEN output = valueN; ELSE output = NULL; END IF;
- Related Articles
- Java if-then-else statement
- What is the if...else statement in JavaScript?
- What is if...else if... statement in JavaScript?
- What is the syntax of Python if...elif...else statement?
- What is basic syntax of Python if...else statement?
- What is the ‘if...else if...else’ statement in Java and how to use it?
- Java if-else statement
- What is the purpose of COALESCE function? Explain with the help of an example.
- Java if-else-if ladder statement
- IF ELSE statement in a MySQL Statement?
- What is the ‘if else’ statement in Java and how to use it?
- If-then-else in Lua Programming
- Explain if-else statement in C language
- Is there such thing as a SELECT with an IF/ELSE statement in MySQL?
- Explain Nested if-else statement in C language

Advertisements