"ORACLE" special null

Source: Internet
Author: User


NULL is a unique data type in the database description of NULL in Oracle NULL
Absence of a value in a column of a row. Nulls indicate missing, unknown, or inapplicable data. When a column of a record is NULL, it indicates that the value of the row is unknown and is indeterminate, since it is unknown, there are countless possibilities. Therefore, NULL is not a deterministic value--judging a column as empty select * from Customeren C WHERE C.modifydt is null;--judging a non-empty select * from Customeren C wher E C.modifydt is not NULL; Test:  --null=null: null is not equal to Nullselect case         when null = NULL then  & nbsp       ' null is equal to NULL '          ELSE          ' null is isn't equal to NULL '        end "Null=null?"   from dual; --empty string =null: empty string is isn't equal to Nullselect case         when "= NULL Then           ' empty strings are equal to NULL '          ELSE          ' empty string is not equal to NULL '        end "empty string =null?"   from dual; --space =null: space is not equal to Nullselect case         when ' = NULL the n          ' spaces are equal to NULL '          ELSE          ' space is not equal to NULL '        end "space =null?"   from dual; --"is null:" Is NullseleCT case         when "is null then         " ' Is null '   &NBSP ;      ELSE          ' are not NULL '        end "' Is null?"   from dual; --empty string = empty string: ' is not equal to ' SELECT case         when ' = ' then          ' is equal to ' '          ELSE        &NBSP ; "is not equal to" "       end" "" "" "?"   from dual; --replace null with a value  select 1 from DUAL where NVL (null,0) =NVL (null,0);  Null sort problem Method 1 replaces null with a value that is used with the NVL function select 1 from dual where NVL (null,0) =NVL (null,0); Method 2 uses NULLS Last,nulls first to process the SELECT C.modifydt from the Customeren C ORDER by C.modifydt NULLS last; SELECT C.modifydt from Customeren C ORDER by C.modifydt NULLS first;

"ORACLE" special 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.