In a table, a column may contain null values and when I am comparing it with a particular value, I am not getting the complete set of result.
So please let me know how to compare/handle null values in Oracle SQL where clause?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Oracle, if you know that a particular table column may contain a null value, then you should use NVL() function to compare it. For example:
If a field type is varchar2, check the following example:
In Oracle Apex, you want to filter the report result based on a page item for a particular column; check the following example for it:
If the user has specified the category value for page item p2_category, it will return the rows only matches with the p2_category, and if the user didn’t select the value for p2_category, meaning p2_category is null, then it will return all rows.
Also, you need to specify the page item p2_category in items to submit property in Oracle Apex.