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

Ben Heath
Ben Heath
8,212 Points

SQL - Delete all products priced at 11 or higher!

This question was asked elsewhere, but the answer doesn't work for me.

I've tried

DELETE FROM products WHERE price > 10;

DELETE FROM products WHERE price >= 11;

Neither of them are accepted answers. Seems like an easy enough task, but no luck.

3 Answers

Ben Heath
Ben Heath
8,212 Points

Odd, I just tried it again, and this time it accepted my answer:

DELETE FROM products WHERE price >= 11;

So, it must have just been a glitch. Before it was saying there was a syntax error at ">".... but there wasn't. I tried several times and it never accepted it, but it did now. Odd

Cindy Lea
PLUS
Cindy Lea
Courses Plus Student 6,497 Points

Can you attach the challenge? You may have a typo somewhere or there may be a Treehouse error.

Ben Heath
Ben Heath
8,212 Points

https://teamtreehouse.com/library/modifying-data-with-sql/deleting-data-from-a-database/deleting-data-with-sql

Is there a different way to attach the challenge?

We have an eCommerce database and it has a products table. It has the columns id, name, description and price. Delete all products priced at 11 or higher!