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 trialYelson Yang
3,983 PointsHow to select all row with missing values?
Following is my code, I believe there is a better way.
SELECT * FROM movies WHERE id IS NULL OR title IS NULL OR year_released IS NULL OR genre IS NULL;
1 Answer
Steven Parker
231,269 PointsA primary key cannot be null, so you can skip testing the "id" field.
Other than that, I think you've got it!
But didn't that database also have a "rating" field? Perhaps I'm thinking of a different exercise. In future questions, please always include a link to the course page you are working with.
Yelson Yang
3,983 PointsThanks for letting me know! Will include course page from now haha.
In this exercise, the rating field is in the review table.
Thank you!
Yelson Yang
3,983 PointsYelson Yang
3,983 PointsThanks for helping out!