SELECT * WHERE 'this-field' has a value?
Moderator: General Moderators
-
WithHisStripes
- Forum Contributor
- Posts: 131
- Joined: Tue Sep 13, 2005 7:48 pm
SELECT * WHERE 'this-field' has a value?
Heya - I need to select all the records from a table that have something, anything, entered in it's field. But I'm not sure how to do this, can someone help? Thanks!
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: SELECT * WHERE 'this-field' has a value?
If you're using NULLs you can do it like this:
Code: Select all
SELECT * FROM `table` WHERE `field` NOT NULL-
WithHisStripes
- Forum Contributor
- Posts: 131
- Joined: Tue Sep 13, 2005 7:48 pm
Re: SELECT * WHERE 'this-field' has a value?
Awesome thanks!