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

I am uncertain as to why I am receiving an error message suggesting that I have only entered three of the four values.

This may just be confusion on my end, but I was able to get this code to work earlier and now what I believe to be the same correctly formatted code is turning up an error message suggesting that I have only entered values for 3 of the 4 values for the particular skill check.

Can you post your code?

here is the original prompt: "We have an eCommerce database and it has a products table. It has the columns id, name, description and price. Add a new product to the products table. Use any valid values you want. All columns are required. The id column is auto incrementing."

This is the structure of the statements I've been attempting: INSERT INTO products (id, name, description, price) VALUE (NULL, "T-shirt", "blue", 12.99);

And here is my error message: "Bummer: Was expecting 4 entries in the products table. There's only 3."

Thanks in advance for the help!

1 Answer

It should be VALUES plural like this:

INSERT INTO products (id, name, description, price) VALUES (NULL, "T-shirt", "blue", 12.99);

Thank you! I had been stuck on this for an embarrassing about of time.