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 trial

Databases

Saad Ali Khan
Saad Ali Khan
1,601 Points

mysql: I need to update two columns: update phone_book set = first_name = "Mystery" and last_name = "Person"; Why ?

f

Saad Ali Khan
Saad Ali Khan
1,601 Points

sorry: Why doesnt that Work?

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi Saad! I'm moving this to the Database boards as it has to do specifically with databases. Also, it would be great if you could link the challenge to which you're referring :sparkles:

1 Answer

Steven Parker
Steven Parker
231,248 Points

:point_right: You probably need to replace "and" with a comma.

You also don't want an equal sign between SET and the first colulmn name:

UPDATE phone_book SET first_name = "Mystery", last_name = "Person";
Saad Ali Khan
Saad Ali Khan
1,601 Points

Thanks Jennifer and Steven. The equal sign was a typo but the comma instead of AND totally worked. Thanks