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 trialLee Li
1,982 PointsPlease help me on this SQL error (insert value).Thanks.
Please help me on this SQL error (insert value).
1 Answer
jcorum
71,830 PointsSince you didn't spell out what the error was, we are left guessing. So my guess is you were having a problem with the INSERT in the Adding Data with SQL challenge. As Jon indicated, you can use NULL to trigger auto-increment: INSERT INTO products (id, name, description, price) VALUES (NULL, "X", "DDD", 23.4) You can also do it this way: INSERT INTO products (name, description, price) VALUES ("X", "DDD", 23.4) where you don't name the field and don't provide a value (knowing the DBMS will provide it for you). I hope this helps. If the problem was a different one please let us know.
Warren Pett
1,612 PointsWarren Pett
1,612 PointsHi, Is this for a specific code challenge? could you explain what you are trying to do and the code you are using.