Hi,
I have a project.
A project has metadata via a n:m relation.
I have a inbetween table called ProjectMetadata. In this table I have two columns: ProjectID and MetadataID.
Metadata has a CategoryID.
I wish to delete all rows from ProjectMetadata connected to a project with a specific CategoryID. I don't need to retrieve the data, just delete them ...
So the SQL Statement will be:
DELETE FROM ProjectMetadata
WHERE (ProjectID = 21)
AND (MetadataID IN
(SELECT MetadataID FROM Metadata WHERE CategoryID = 14))
Can anyone tell me how to do this?
Thanks in advance,
G.I.