NULL Condition in Oracle SQL
NULL Condition in Oracle SQL
Topic Introduction: In this tutorial, we will discuss Using the NULL Condition in Oracle SQL. The NULL conditions include the IS NULL condition and the IS NOT NULL condition. Null is a value that is unavailable, unassigned, unknown, or inapplicable. Null is not the same as zero or a blank space. Therefore, we cannot test with =, because a null cannot be equal or unequal to any value.
Example 1:
SELECT last_name, job_id, commission_pctFROM employeesWHERE commission_pct IS NULL;
Example 2:
SELECT last_name, job_id, commission_pctFROM employeesWHERE commission_pct IS NOT NULL;
Here have 2 examples using null and not null conditions. example 1 will return the employee list who do not get a commission
and example 1 will return the employee list of those who get a commission
No comments