NULL Record

O

Olivia Towery

How do I write select statement to choose records with a specific field that
is NULL? Example - I want to select all records who do not have any email
listed.

Thanks,

--
Olivia Towery
Tower Internet Management
Phone - 909.652.8064
Fax - 909.652.8068
Cellular - 619.454.5005
 
A

Aaron Bertrand - MVP

If it is only NULL:
SELECT columns FROM table WHERE email IS NULL

If it is NULL or empty string:

SQL Server
SELECT columns FROM table WHERE COALESCE(RTRIM(email), '') = ''

Access, maybe this?
SELECT columns FROM table WHERE NULLIF(email, '') = ''


*ALWAYS* useful to post the database you're using and the version...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top