Selecting blank entries

You can use the operator IS NULL to find or exclude fields with no data. For example, using the Employee table:

SELECT Company, Phone, FROM AddressBook WHERE Company IS NULL;

This would return all none-companies from and address book. To reverse this, and select all companies from the address book, use:

SELECT Company, Phone, FROM AddressBook WHERE Company IS NOT NULL;

See also:

Selecting records - the basics

Other types of SQL statements