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

this is my sql: UPDATe phone_book SET first_name='Mystery' AND last_name='Person'. But it doest work. can you help?

i get an error: was expecting 6 variables, but i have 0

the syntax is

UPDATE phone_book SET first_name = "Mystery" , last_name = "Person";

2 Answers

Steven Parker
Steven Parker
231,128 Points

Separate multiple column SETs with commas.

The AND operator is for combining expressions, but when doing a SET on more than one column, separate the column = value groups with commas.

Thank you :) I figured it out last night :D and it worked^^