SlideShare a Scribd company logo
2
Most read
3
Most read
5
Most read
By : Dhirendra Chauhan
NULL Value
“A field with a NULL value is a field with no
value.”
“A NULL value is different from a zero value
or a field that contains spaces. A field with
a NULL value is one that has been left
blank during record creation!”
How to Test for NULL Values?
It is not possible to test for NULL values with
comparison operators, such as =, <, or <>.
We will have to use the IS NULL and IS NOT
NULL operators instead.
IS NULL
Syntax:
SELECT column_names
FROM table_name
WHERE column_name IS NULL;
The IS NULL operator is used to test for empty values (NULL
values).
Example:
SELECT names
FROM Employee
WHERE Salary IS NULL;
Always use IS NULL to look for NULL values.
IS NOT NULL
Syntax:
SELECT column_names
FROM table_name
WHERE column_name IS
NOT NULL;
The IS NOT NULL operator is used to test for Non- empty
values (For values).
Example:
SELECT names
FROM Employee
WHERE Salary IS NOT
NULL;
THANK
YOU

More Related Content

PDF
Database Normalization
PPTX
Aggregate function
PPT
ER Diagram
PPT
Sql join
PDF
SQL JOINS
PPTX
DATABASE CONSTRAINTS
PPT
Types Of Join In Sql Server - Join With Example In Sql Server
Database Normalization
Aggregate function
ER Diagram
Sql join
SQL JOINS
DATABASE CONSTRAINTS
Types Of Join In Sql Server - Join With Example In Sql Server

What's hot (20)

PPTX
Lab2 ddl commands
PPTX
Calculated Fields in Tableau
ODP
PPT
SQL subquery
PPTX
Normal forms
PPT
SQL Queries
PPTX
Types Of Keys in DBMS
PPTX
SQL JOIN
PPTX
joins in database
PPTX
Relational Algebra,Types of join
PPTX
SQL - DML and DDL Commands
PPT
SQL select statement and functions
PPT
Sequences and indexes
PPTX
SQL(DDL & DML)
PPTX
SQL Joins.pptx
PPTX
Sql Constraints
PPTX
Structure of dbms
PPTX
Sql joins inner join self join outer joins
PPT
Sql Server Basics
Lab2 ddl commands
Calculated Fields in Tableau
SQL subquery
Normal forms
SQL Queries
Types Of Keys in DBMS
SQL JOIN
joins in database
Relational Algebra,Types of join
SQL - DML and DDL Commands
SQL select statement and functions
Sequences and indexes
SQL(DDL & DML)
SQL Joins.pptx
Sql Constraints
Structure of dbms
Sql joins inner join self join outer joins
Sql Server Basics
Ad

Similar to Null / Not Null value (12)

PPT
Null Values.ppt briefing about null values in SQL. Very helpful if you are le...
PDF
Handling SQL Server Null Values
PPTX
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
PPTX
Beginers guide for oracle sql
PPTX
SQL Keywords and Functions.pptx
PPT
Intro to tsql unit 3
PPT
Intro To TSQL - Unit 3
DOC
Practice 1
PDF
012. SQL.pdf
PPT
ALL ABOUT SQL AND RDBMS
Null Values.ppt briefing about null values in SQL. Very helpful if you are le...
Handling SQL Server Null Values
Recipe 5 of Data Warehouse and Business Intelligence - The null values manage...
Beginers guide for oracle sql
SQL Keywords and Functions.pptx
Intro to tsql unit 3
Intro To TSQL - Unit 3
Practice 1
012. SQL.pdf
ALL ABOUT SQL AND RDBMS
Ad

More from Dhirendra Chauhan (20)

PPTX
V35 keys-c
PPTX
V34 numeric function-c
PPTX
V33 date function-c
PPTX
V31 having
PPTX
V30 full join(union intersect etc)
PPTX
V29 group by-c
PPTX
PPTX
V27 constraint
PPTX
PPTX
V25 sql index
PPTX
V24 cartesion product-c
PPTX
V23 function-2
PPTX
V22 function-1
PPTX
V21 in operator
PPTX
V20 bet ween operator-c
PPTX
V19 join method-c
PPTX
V18 alias-c
PPTX
V17 show command-c
PPTX
V16 sql comments-c
PPTX
V15 like operator-c
V35 keys-c
V34 numeric function-c
V33 date function-c
V31 having
V30 full join(union intersect etc)
V29 group by-c
V27 constraint
V25 sql index
V24 cartesion product-c
V23 function-2
V22 function-1
V21 in operator
V20 bet ween operator-c
V19 join method-c
V18 alias-c
V17 show command-c
V16 sql comments-c
V15 like operator-c

Recently uploaded (20)

PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Insiders guide to clinical Medicine.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Complications of Minimal Access Surgery at WLH
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
Week 4 Term 3 Study Techniques revisited.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Insiders guide to clinical Medicine.pdf
Microbial disease of the cardiovascular and lymphatic systems
Microbial diseases, their pathogenesis and prophylaxis
Anesthesia in Laparoscopic Surgery in India
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
TR - Agricultural Crops Production NC III.pdf
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
01-Introduction-to-Information-Management.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPH.pptx obstetrics and gynecology in nursing
Complications of Minimal Access Surgery at WLH
2.FourierTransform-ShortQuestionswithAnswers.pdf

Null / Not Null value

  • 1. By : Dhirendra Chauhan
  • 2. NULL Value “A field with a NULL value is a field with no value.” “A NULL value is different from a zero value or a field that contains spaces. A field with a NULL value is one that has been left blank during record creation!”
  • 3. How to Test for NULL Values? It is not possible to test for NULL values with comparison operators, such as =, <, or <>. We will have to use the IS NULL and IS NOT NULL operators instead.
  • 4. IS NULL Syntax: SELECT column_names FROM table_name WHERE column_name IS NULL; The IS NULL operator is used to test for empty values (NULL values). Example: SELECT names FROM Employee WHERE Salary IS NULL; Always use IS NULL to look for NULL values.
  • 5. IS NOT NULL Syntax: SELECT column_names FROM table_name WHERE column_name IS NOT NULL; The IS NOT NULL operator is used to test for Non- empty values (For values). Example: SELECT names FROM Employee WHERE Salary IS NOT NULL;