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.
We have an eCommerce database and it has a products table. It has the columns id, name, description and price...
INSERT INTO products (name, description, price) Value ('t-shirt','white',2.99); I don't understand what is wrong with this code
Try this: INSERT INTO products(name, description, price) VALUES("banana","The best fruit",3.99);
Steven Parker218,639 Points
The rest of task 1 says, "Add a new product to the products table. Use any valid values you want. All columns are required. The id column is auto incrementing."
Since the ID column is auto incrementing, it can be left out. So you'll want to construct an INSERT statement that names the other 3 columns, and then supply VALUES for each of them. You can make up anything, it won't care as long as you supply all 3.
Give it a shot, and if you still have trouble post your code here for further assistance.