I have two tables: people (with information about people) and schedule (with information about when people are scheduled for a task). The tables can be related by people.id and schedule.people_id.
I want to DELETE all the people who are not scheduled. I know how to write a query that will SELECT all unscheduled people:
SELECT people LEFT JOIN schedule ON people.id = schedule.people_id WHERE schedule.date is NULL
But how can I turn this into a query to delete these records? I need a query that will work with mySQL 3.23, so I can't use any of the new mySQL 4 features.
Any ideas?
--Jeff