I have three tables. A PROJECTS and IMAGES table and a PROJECT_IMAGES table which attaches images to a project.
I was asked to create a script which erases the images on the server which are not in the PROJECT_IMAGES table. Is there an efficient way of returning only the images which are not present in the PROJECT_IMAGES table in one query?
That actually worked very well. I haven't tried baburajv's Delete Statement yet. But the select with the LEFT OUTER JOIN worked. I'm absolutely not familiar with these joins. So confusing. Also the way you're using a variable ... FROM IMAGES i ... what do you call this method? I'd like to read up on it.