Oracle NULL IS NULL

Source: Internet
Author: User

NULLNoGreater than/less than/equal to/not equal to any value (including NULL itself), with only: NULL IS NULL

  1. SQL>SetServeroutput on
  2. SQL>
  3. SQL> BEGIN
  4. 2 IF (2> NULL)
  5. 3 THEN
  6. 4 dbms_output.put_line ('>');
  7. 5 ELSIF (2 <NULL)
  8. 6 THEN
  9. 7 dbms_output.put_line ('<');
  10. 8 ELSIF (2 = NULL)
  11. 9 THEN
  12. 10 dbms_output.put_line ('=');
  13. 11 ELSIF (2! = NULL)
  14. 12 THEN
  15. 13 dbms_output.put_line ('! =');
  16. 14 ELSE
  17. 15 dbms_output.put_line ('Unknown! ');
  18. 16 end if;
  19. 17
  20. 18 IF (NULL = NULL)
  21. 19 THEN
  22. 20 dbms_output.put_line ('Null = null');
  23. 21 ELSIF (NULL! = NULL)
  24. 22 THEN
  25. 23 dbms_output.put_line ('Null! = Null');
  26. 24 ELSIF (null is null)
  27. 25 THEN
  28. 26 dbms_output.put_line ('Null IS null');
  29. 27 ELSE
  30. 28 dbms_output.put_line ('Unknown !! ');
  31. 29 end if;
  32. 30 END;
  33. 31/
  34. Unknown!
  35. NULL IS NULL
  36. PL/SQL procedure successfully completed
  37. SQL>

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.