"Go" Oracle NULL

Source: Internet
Author: User
Tags numeric value rtrim

Turn from: null and empty string ' of Oracle '

1. Oracle treats empty string as ' null '

2, null and any value do the logical operation of the result is false, including and null itself

3. Empty string and null are NULL when judged by IS null

4, NULL, and any numeric value for mathematical operations, the result is null

5, can use | | Concatenate an empty string or null and string

Select ' A ' | | null | | ' B ' from dual; = = Result of AB

6, NULL as the parameter of the following Oracle built-in function, the result is also null
Select NVL (Length (null), -1) from dual;

Select NVL (Trim (null), -1) from dual;

Select NVL (LTrim (null), '-1 ') from dual;
Select NVL (RTrim (null), '-1 ') from dual;
Select NVL (RTrim (null, '), '-1 ') from dual;

Select NVL (Soundex (null), '-1 ') from dual;

Select NVL (SUBSTR (null,1), -1) from dual;

Select NVL (INSTR (null,1), -1) from dual;

Select NVL (replace (null, ' A ', ' B '), '-1 ') from dual;

Select NVL (min (null), '-1 ') from dual;
Select NVL (max (null), '-1 ') from dual;
Select NVL (SUM (null), '-1 ') from dual;
Select NVL (AVG (NULL), '-1 ') from dual;
Select NVL (SUM (null), '-1 ') from dual;

7, NULL as a parameter to the following Oracle built-in function, the result is not NULL:

Select Concat (' a ', null) from dual;
Select Concat (null, ' a ') from dual;
Select count (null) from dual;

8, other functions when used, you can also use the above method to test

"Go" Oracle NULL

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.