[SOLVED] MySQL statement not working

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
ljCharlie
Forum Contributor
Posts: 289
Joined: Wed May 19, 2004 8:23 am

[SOLVED] MySQL statement not working

Post by ljCharlie »

Why is the following sql statement not working?

Code: Select all

SELECT *
FROM boardMember
WHERE brdPosition = NULL
ORDER BY brdLstName ASC
The above generates nothing. Why is that? The brdPosition columns contains some NULL values and some don't. I want to filter all the NULL values. How do I do that?

Thanks!
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Code: Select all

SELECT *
FROM boardMember
WHERE brdPosition IS NULL
ORDER BY brdLstName ASC
ljCharlie
Forum Contributor
Posts: 289
Joined: Wed May 19, 2004 8:23 am

Post by ljCharlie »

Perfect!!!

It works!

Many thanks to you.
Post Reply