Relationship between "and null" in Oracle Database

Source: Internet
Author: User

In Oracle databases, ''is equivalent to null. Both indicate null values, rather than Null strings like ''in other databases. null indicates null values.

 

Oracle allows blank fields of any data type, except for the following two cases:

1. primary key field (Primary Key ),

2. fields with the not null restriction added during definition

 

Note:

1. null is equivalent to no value and is unknown.

2. null and 0, empty strings, and spaces are different.

3. add, subtract, multiply, and divide null values. The result is still null.

4. The nvl function is used for null processing.

5. Use the keyword "is null" and "is not null" for comparison ". It cannot be compared with other values equal to, not equal to, greater than, or less than. Of course, it also includes the null value itself (except in decode, the two null values are considered to be equivalent)

6. null values cannot be indexed. Therefore, some data that meets the query conditions may not be found. In count (*), nvl (column name, 0) is used for processing and then query.

7. Sorting is larger than other data (the index is sorted in descending order by default, small → large), so the null value is always at the end.

8. In the where condition, if Oracle considers the condition that the result is null to be false, select statements with such conditions do not return rows or error messages.

 

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.