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 trialxczurymqdj
2,289 Pointswhat is a condition again?
Im not sure what condition Im to put to delete spefic rows.
3 Answers
Ismael Liriano
11,490 PointsHi. 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.
xczurymqdj
2,289 PointsI 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;
Ismael Liriano
11,490 PointsBecause you are deleting all the products with prices lower than 11
xczurymqdj
2,289 PointsYah I reliazed that after I posted that. Thank yoi so much for helping me figure it out.