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 Modifying Data with SQL Deleting Data From a Database Deleting Data With SQL

what is a condition again?

Im not sure what condition Im to put to delete spefic rows.

3 Answers

Hi. A condition is a statement that has to be accomplished before executing something.

For example, let's say I have a table called Person, and I want to delete all the people younger than 20 years old. I would write "DELETE * FROM Person WHERE age < 20;". "WHERE age < 20" would be the condition.

I need to delete all products priced at 11 or higher. But I'm stuck because the code I'm using isn't working. The code I'm using is DELETE * FROM products WHERE price < 11;

Because you are deleting all the products with prices lower than 11

Yah I reliazed that after I posted that. Thank yoi so much for helping me figure it out.