loading

SQL Null Functions

Sql Null Functions -

Look at the following “Products” table:

P_Id ProductName UnitPrice UnitsInStock UnitsOnOrder
1 Jarlsberg 10.45 16 15
2 Mascarpone 32.56 23  
3 Gorgonzola 15.67 9 20

Assume that NULL values may be present in the optional “UnitsOnOrder” column.

Examine the SELECT statement that follows:

				
					SELECT ProductName, UnitPrice * (UnitsInStock + UnitsOnOrder)
FROM Products;
				
			

The previous example’s outcome will be NULL if any of the “UnitsOnOrder” values are NULL.

------- Solutions LAKHAVA-------

Share this Doc

SQL Null Functions

Or copy link

Explore Topic