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

sherelle smith
sherelle smith
1,387 Points

"Was expecting 11 entries in the users table. There's only 10" error?

Hey! Why am I getting "Was expecting 11 entries in the users table. There's only 10" error?

Brandon White
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Brandon White
Treehouse Moderator

In order for us to be able to help you with this, sherelle, you have include the code you’ve written. Otherwise, we can’t test it to see what’s causing the issue.

sherelle smith
sherelle smith
1,387 Points

INSERT INTO users (username, password, first_name, last_name) VALUES ("pass", "jdjhfjds");

3 Answers

Hi Sherelle

The users table has 4 columns: username, password, first_name, last_name (I will not count 'id' since this column is auto incrementing). You are passing values to only 2 columns. The challenge states that all columns are required.

I hope this hint helps!

sherelle smith
sherelle smith
1,387 Points

Thank you! I updated it to INSERT INTO users (username, password, first_name, last_name) VALUES ("pass", "jdjhfjds", "9.9", "first"); this worked

sherelle smith
sherelle smith
1,387 Points

INSERT INTO users (username, password, first_name, last_name) VALUES ("pass", "jdjhfjds");

Great to hear, Sherelle, you are welcome!