NULL vs Arithmetic in Oracle Database Example

How to Use NULL Arithmetic in Oracle Database Tutorial Example

Run Query Editor then copy & paste the below code to get the NULL affect on arithmetic values in Oracle Database Server Tutorial Example

   -- CONNECT AS Any User or HR

   SELECT  10/10,
           NULL+10,
           NULL-10,
           NULL/10,
           10/NULL,
           NULL*10
   FROM    DUAL;

      -- is comment in Oracle
      -- in fact it is comment in MSSQL and MySQL as well

      Oracle Says Any arithmetic calculation with a NULL value always returns NULL.
      My Learning About NULL!!
      1. NULL IS A VALUE THAT IS UNAVAILABLE
      2. NULL IS A VALUE THAT IS UNASSIGNED
      3. NULL IS A VALUE THAT IS UNKNOWN
      4. NULL IS A VALUE THAT IS INAPPLICABLE
      5. NULL IS A VALUE THAT IS NOT EVEN EQUAL TO NULL
      6. NULL IS A VALUE THAT IS NOT EQUAL TO ZERO : ZERO IS A NUMBER
      7. NULL IS A VALUE THAT IS NOT EQUAL TO BLANK SPACE OR EMPTY STRING : SPACE IS A CHARACTER
      8. COLUMNS OF ANY DATATYPE CAN CONTAIN NULL VALUE
   

How to Use NULL Arithmetic in Oracle Database Tutorial Example - Result in Query Editor Client Tools

No comments:

Post a Comment

leave your comments here..