will35010 Posted January 15, 2010 Share Posted January 15, 2010 Lets say I have a table with two columns: name and id. I want to know how to run a select query like so: SELECT name FROM people WHERE id = null; I only want to return results where the id column is null. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/188626-select-query-where-field-is-null-question/ Share on other sites More sharing options...
akitchin Posted January 15, 2010 Share Posted January 15, 2010 have you tried that query? it looks like it should work. Quote Link to comment https://forums.phpfreaks.com/topic/188626-select-query-where-field-is-null-question/#findComment-995823 Share on other sites More sharing options...
will35010 Posted January 15, 2010 Author Share Posted January 15, 2010 have you tried that query? it looks like it should work. I did and it didn't. Quote Link to comment https://forums.phpfreaks.com/topic/188626-select-query-where-field-is-null-question/#findComment-995825 Share on other sites More sharing options...
will35010 Posted January 15, 2010 Author Share Posted January 15, 2010 Just found it on google. Thanks! SELECT name FROM people WHERE id IS NULL; Quote Link to comment https://forums.phpfreaks.com/topic/188626-select-query-where-field-is-null-question/#findComment-995829 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.