I have a SELECT statement, and I want to DELETE what I am selecting. When I change the SELECT to a DELETE, I get errors. How do I use the DELETE to delete what I selected?
This is my query:
SELECT course.course_id FROM course LEFT JOIN section ON section.course_id = course.course_id WHERE section.course_id IS NULL;
DELETE table WHERE .... Ensure that you're not doing something likeDELETE * FROM table WHERE ...