Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAlex Moon
1,888 PointsPicking all the data that is null
Find all movies with any missing data.
I put SELECT * FROM movies WHERE id OR genre OR year_released OR title IS NOT NULL; but I get data that doesn't necessarily has NULL values as well.
2 Answers
Jennifer Nordell
Treehouse TeacherHi there, Alex Moon! According to the code that you posted above you're picking thing where the title is NOT NULL. You'll want to pick things where something IS NULL
Also, you will need to specify each thing that could potentially be NULL
. Here was my solution:
SELECT * FROM movies WHERE title IS NULL OR year_released IS NULL OR genre IS NULL;
Hope this helps!
Tashan Duncan
Front End Web Development Techdegree Graduate 17,799 PointsI'm curious how you would go about doing this if there were many columns.
I tried
SELECT * FROM movies Where * is NULL
And got the Error "Error: near "*": syntax error"
Rusu Mihail
2,351 PointsRusu Mihail
2,351 PointsJennifer Nordell you are a lifesaver! Thanks!