In this video we see the different NULL functions in SQL and see, when and how to use the NULL functions.
A field with a NULL value is a field with no value. If a field in a table is optional, it is possible to insert a new record or update a record without adding a value to this field. Then, the field will be saved with a NULL value.
Note: A NULL value is different from a zero value or a field that contains spaces.
Table used :
/*
create table product(
item varchar(20),
unitssold int,
unitsonorder int,
unitprice int
)
*/
/*
insert into product(item,unitssold,unitsonorder,unitprice)
values('pen',100,50,20),
('book',200,null,30),
('pencil',150,50,10),
('toys',125,null,40),
('bags',100,25,50)
*/
#data_project_hub
#dataprojecthub
#dataanalytics
#sqlqueries