Magic of NULL in MSSQL Arithmetic Operation

Magic of NULL In MSSQL Database Server Tutorial Example

Run microsoft sql server management studio query editor or any client tools you like then copy & paste the below code to see the magic of NULL in Arithmetic Operation in select clause on a table usinq sql command or statement in MSSQL Database Server Tutorial Example

   SELECT NULL,
        NULL+1,
        1-NULL,
        NULL-1,
        NULL*1*0+1-10,
        1/NULL,
        NULL/1
My Learning About NULL!! On Database Arithmetic Operation
  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


   /* */ is multiline code comments in MSSQL
   -- is comment in MSSQL
   -- in fact it is comment in Oracle and MySQL as well

Magic of NULL In MSSQL Database Server Tutorial Example - Result in Microsoft Sql Server Management Studio Query Editor Client Tools

No comments:

Post a Comment

leave your comments here..