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

Christin Hebron
Christin Hebron
761 Points

INSERT INTO - the challenge question keeps saying that they are expecting 11 entries, but there is only 10.

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!)

My answer is INSERT INTO users (id, username, password, first_name, last_name) VALUES (4, "hello", "hello123", "Jen", "Def");

The response I keep getting is that they are expecting 11 entries but I only have 10? Not sure what this means.

1 Answer

Hi Christin,

If you want your id to be auto-incrementing, you have to use NULL as your argument instead of 4.

Hope that helps!