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 trialAlina Li
1,820 Pointstask #2 from Modifying Data with SQL
Task: update all contacts to first name "Mystery" and last name "Person"
my code:
update phone_book set first_name = "Mystery"
update phone_book set last_name = "Person"
there is Bummer!
What's wrong with my code?
2 Answers
Steven Parker
231,269 PointsYou forgot to provide a link to the challenge, but I'd bet it wants you to set both values with one UPDATE
statement instead of two separate ones.
Alina Li
1,820 PointsThanks to everybody!
Steven Parker was right
''' update phone_book set first_name = "Mystery", last_name = "Person"
Josh Keenan
20,315 PointsJosh Keenan
20,315 PointsTried that and that didn't work, neither did his code, any ideas?
update phone_book set first_name = "Mystery" set last_name ="Person";
How can I get it to pass?
Steven Parker
231,269 PointsSteven Parker
231,269 PointsWhere is "his code"? And you still forgot to link to the challenge page.
But when setting multiple columns, use the word "set" only once, and separate the individual settings with commas.