- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
Performing Null check using HANA SQL Script
You can go for using either NULLIF or COALESCE function to serve your requirement.
NULLIF (expression, expression"): This function will return the same type whatever is specified as the first expression.
Basically, NULLIF returns
The first expression if the two expressions are not equal.
NULL of type of first expressions if the expressions are equal
The other function available is COALESCE which basically checks if the first Value provided is NULL then it will return the second value.
Example
c = COALESCE(b , a)
If b is null then the function will return an otherwise b. So If you need to put a null check and use some default value in place of NULL then you can go ahead and use COALESCE.
- Related Articles
- SQL Script vs Graphical Calcualtion views in SAP HANA
- Performing different SAP logon check while connecting to HANA
- How to run .SQL script using JDBC?
- SQL query to check SAP HANA system version
- Sort data in SQL using Dynamic SQL in SAP HANA
- Opening SQL editor using SAP HANA Studio
- Loading an individual column in SAP HANA using SQL
- Converting BLOB to Char in SAP HANA using SQL
- Converting BLOB to Char in SAP HANA using SQL
- Check if a field of table has NOT NULL property set in SQL?
- Creating a Standard user in SAP HANA system using SQL
- Creating a new remote source in SAP HANA using SQL
- Difference between Open SQL, Native SQL in SAP HANA
- How to run SQL script in MySQL?
- \nLoad and unload a table in SAP HANA using SQL query

Advertisements