Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Databases Modifying Data with SQL Updating Data in a Database Updating Data in a Database Review

Alex Fleming
Alex Fleming
1,044 Points

Review questions, stuck on one particular question and keep getting it wrong? Figured it should of been NULL?

Finish the following statement to replace NULL values with the value of "Cross-Platform".

UPDATE games SET platform = "Cross-Plaform" WHERE id = _______________ (1,4);

3 Answers

Steven Parker
Steven Parker
221,310 Points

The question had no "=" before the blank.

You must have accidentally added it while copying the question. The actual question was:

UPDATE games SET platform = "Cross-Platorm" WHERE id _____ (1,4);

So the question is looking for the operator which would check if id was either one of the two values in parentheses. Hint: it's a word, not a symbol.

Also, you should be aware that you cannot test for NULL using an equality ("="). To test for NULL you would use the identity operator ("IS").

Brenda Krafft
Brenda Krafft
18,036 Points

The code is trying to say:

Update the games table, by setting the platform field to "Cross-Platform" (you are missing a "t" there) where the id IS either 1 or 4.

So they are looking for an id IN the set of (1, 4).

Steven Parker
Steven Parker
221,310 Points

The missing "t" is actually how the question is shown in the quiz.

But since you only need to supply what goes in the blank, it doesn't affect the outcome.

:beetle: It would, however, be an opportunity for someone who might want an exterminator badge to report to Support.