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

Joshua Goss
Joshua Goss
5,010 Points

My SQL query is not being accepted and I don't know why.

I am not using the optional step of including the column names and the directs don't specify to do so. Create method is the same as my last one, I thought it was looking for a "string" but nothing seems to work.

Jason Larson
Jason Larson
5,485 Points

It's impossible to say what's wrong without seeing your code. Perhaps you could paste it into a comment so that we might be able to help?

1 Answer

Joshua Goss
Joshua Goss
5,010 Points

What?? I'm sorry I told the question pop-up to include my code! SMH. What I had written was;

INSERT INTO products VALUES (NULL, Torta, food, 1.00);

After some headbanging against the keyboard I thought maybe the text needs to be in a string format. This turned out to be what the system was looking for, "Torta" and "food". Thank you for coming in to assist!