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

Why isn't this working??

Remove all movies from the year 1985 from the movies table.

DELETE FROM movies WHERE year =1985;

3 Answers

Alan Ayoub
Alan Ayoub
40,294 Points

I just tried it on my end and it worked for me. Maybe spacing between the equal sign and the year?

          DELETE FROM movies WHERE year = 1985;
Drew Butcher
Drew Butcher
33,160 Points

Try this

SET FOREIGN_KEY_CHECKS = 0;
DELETE FROM movies WHERE year = 1985;

Let me know if that worked or not, please.

Steven Parker
Steven Parker
231,261 Points

This looks like an answer to Task 3 of the Inserting, Updating and Deleting Rows challenge of the Database Foundations course.

:point_right: If so, it is the correct answer. :white_check_mark:

What happened when you clicked the Check Work button?