IS NOT NULL

Check for items that contain a value.

Syntax
      expression IS NOT NULL;

Key
   Expression may be a column_name or a calculated value.

Examples

Return all the receipts where the delivery date is NOT null (so it has been delivered on one date or another)

SQL> select * from receipts
where delivery_date IS NOT NULL;

Return all the addresses where the zip code is NOT null (so they do have a zip code)

SQL> select * from addresses
where zip_code IS NOT NULL;

This can also be used in PL/SQL in much the same way: IF myvariable IS NOT NULL then…

“Using dummy values to represent NULL or unknown is usually a bad idea, in 1979 a Los Angeles man named Robert Barbour found this out the hard way when he sent an application to the California Department of Motor Vehicles (DMV) requesting personalized license plates for his car”

Related

IS NULL - Check for NULL (empty) values
SQL Functions - Oracle SQL
ORA-00932 inconsistent datatypes



Back to the Top

© Copyright SS64.com 1999-2012
Some rights reserved