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 Adding Data to a Database Adding Data With SQL

Ker Sing Tan
Ker Sing Tan
10,570 Points

Challenge 2 of 3 error

I got this error message : Was expecting 11 entries, but you only have 10 entries.

But I supposed columns id + username + password+ first name + last name = 5 entries and in total should be only 10 entries in the SQL syntax.

Question: The same eCommerce database has a users table. It has the columns id, username, password, first_name, and last_name.

Add a new user to the users table. Use any valid values you want. All columns are required. The id column is auto incrementing.

(Don't enter a real password you'd really use!)

Steven Parker
Steven Parker
210,936 Points

Please show your actual complete query, I'll bet we can figure it out.

And "entries" just refers to the number of rows, it's not related to the columns.

3 Answers

INSERT INTO users (username, password, first_name, last_name) VALUES ("sspears@gmail", "pass222", "Stephanie", "Spears");

Let us know what query you entered in

Steven Parker
Steven Parker
210,936 Points

Did you mean to leave a comment? You posted this as an "answer". :wink:

Steven Parker
Steven Parker
210,936 Points

That code looks good to me, so I tried pasting it directly into the challenge and it passed!

Perhaps your browser is in some odd state. Try restarting it and give the challenge another shot.