.NET FAQs Unleashed!
 
    
    

What is a NULL entity in SQL?

Null is an entity in SQL that is used to specify that a value does not exist. It is a reserved keyword in SQL.

Most SQL languages use the expression IS NULL in the where clause for matching records with NULL values, instead of comparing with NULL using an equality operator. See code example below:

SELECT FIRSTNAME FROM T_STUDENTS WHERE LASTNAME IS NULL;

Following functions handle Null values:

Coalesce - This function returns the first non NULL value from a list of values.
NullIf - This function accepts 2 paramaters. If both parameters are equal, NULL is returned, else the first paramater's value is returned.

SQL Queries  SQL  Create Table  DDL, Create, Alter, Drop commands  DML, Select, Insert, Update, Delete  Create Database  ACID Rules  Dual Table  NULL  Join, Inner, Outer, Left, Right, Full, Cartesian, Natural, Equi  Table, View and a Synonym?  Execute  Function  Stored Procedure  Syntax Stored Proc  Stored Procedure Vs. Function