Skip to Content

HANA Null values and ''


could you please clarify me on the following?

--NULL and NOT
Select ID, "Null Demo" , Length ("Null Demo" )
SELECT 'CHAR' ID, TO_CHAR('') "Null Demo" 


I thought NULL or a string literal are same '' .

But if I do WHERE "Null Demo" IS NULL then I am getting only the first row.

What is the difference between NULL and ''.

Kindly explain.

Thank you.

null-values.png (9.6 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Oct 15, 2018 at 04:10 PM

    No, NULL and a blank are not the same. If you search for the term NULL, than you will find a lot of explanations. The easiest one ist that Null is the "absence of a value e.g. in a certain field", or that no value exists for the field. Instead a '' is a known value.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.