Page 1 of 1
SELECT * WHERE 'this-field' has a value?
Posted: Mon Jun 08, 2009 2:50 pm
by WithHisStripes
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!
Re: SELECT * WHERE 'this-field' has a value?
Posted: Mon Jun 08, 2009 2:52 pm
by jayshields
If you're using NULLs you can do it like this:
Code: Select all
SELECT * FROM `table` WHERE `field` NOT NULL
Re: SELECT * WHERE 'this-field' has a value?
Posted: Mon Jun 08, 2009 2:56 pm
by WithHisStripes
Awesome thanks!